Package host.anzo.simon
Class SimonPublication
java.lang.Object
host.anzo.simon.SimonPublication
This class holds a 3-tupel of data needed to identify a remote object on a registry.
The tupel consists of:
- address to which the registry of the remote object is bind to
- the port on which the registry listens
- the remote object name bind to the registry
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimonPublication(String rawString) Creates an object instance according to a raw string with the format:
[SIMON|192.168.0.123:1234|myServer]protectedSimonPublication(InetAddress address, int port, String remoteObjectName) Creates a new object instance according to the given address, port and remote object name -
Method Summary
-
Constructor Details
-
SimonPublication
Creates a new object instance according to the given address, port and remote object name- Parameters:
address- the address of a SIMON registryport- the port on which the registry listensremoteObjectName- the bind remote object name
-
SimonPublication
protected SimonPublication(String rawString) throws IllegalArgumentException, UnknownHostException, NumberFormatException Creates an object instance according to a raw string with the format:
[SIMON|192.168.0.123:1234|myServer]- Parameters:
rawString- the string that delivers the needed data to create an instance ofSimonPublication- Throws:
IllegalArgumentException- if raw string has the wrong formatUnknownHostException- if the host in the raw string is unknownNumberFormatException- if the port in the raw string has the wrong format (e.g. non numeric)
-
-
Method Details
-
getRemoteObjectName
Returns the name of the remote object which is bind to the registry- Returns:
- name of the remote object
-
getPort
public int getPort()Returns the port on which the registry listens for connections- Returns:
- port on which the registry listens
-
getAddress
Returns the network address to which the registry is bind- Returns:
- an address of the registry
-
toString
-
equals
-