|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfulmine.AbstractLifeCycle
fulmine.distribution.connection.tcp.TcpConnectionParameters
public class TcpConnectionParameters
Encapsulates the parameters for the TCP/IP server socket of a remote
IFrameworkContext to connect to.
A note on the hierarchy; this only extends AbstractLifeCycle because
the TcpConnection sub class requires the ILifeCycle method
implementations provided by the AbstractLifeCycle. This is a conceded
design choice.
| Constructor Summary | |
|---|---|
TcpConnectionParameters(String identity,
int connectionHashCode,
String address,
int port)
Standard constructor for the parameters of a TCP/IP connection to a remote IConnectionBroker. |
|
| Method Summary | |
|---|---|
protected void |
doDestroy()
Overridden in subclasses to perform custom logic on destruction. |
protected void |
doStart()
Overridden in subclasses to perform custom logic on activation. |
boolean |
equals(Object obj)
|
String |
getAddress()
|
IDomain |
getDomain()
|
String |
getIdentity()
|
int |
getRemoteContextHashCode()
Get a unique integer for the remote context. |
String |
getRemoteContextIdentity()
Get the identity of the IFrameworkContext at the remote end of
the connection |
protected String |
getRemoteHostAddress()
|
protected int |
getRemoteHostTcpPort()
|
IType |
getType()
|
int |
hashCode()
|
boolean |
isEqual(IConnectionParameters connectionParameters)
Checks the connection parameters for equality. |
protected void |
setIdentity(String identity)
|
protected void |
setRemoteContextHashCode(int hashCode)
|
String |
toString()
|
| Methods inherited from class fulmine.AbstractLifeCycle |
|---|
checkActive, destroy, finalize, getLog, isActive, start |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TcpConnectionParameters(String identity,
int connectionHashCode,
String address,
int port)
IConnectionBroker.
identity - the connection identity (the identity of the remote context)connectionHashCode - the hashcode of the connection to the remote contextremoteHostAddress - the IP remoteHostAddress or resolvable host nameremoteHostTcpPort - the remoteHostTcpPort for the socket connection| Method Detail |
|---|
public final String getRemoteContextIdentity()
IConnectionParametersIFrameworkContext at the remote end of
the connection
getRemoteContextIdentity in interface IConnectionParametersprotected String getRemoteHostAddress()
IConnectionBrokerprotected int getRemoteHostTcpPort()
IConnectionBrokerprotected void setIdentity(String identity)
public final String getIdentity()
public IType getType()
public IDomain getDomain()
public String getAddress()
protected void setRemoteContextHashCode(int hashCode)
public int getRemoteContextHashCode()
IConnectionParameters
getRemoteContextHashCode in interface IConnectionParameterspublic boolean isEqual(IConnectionParameters connectionParameters)
IConnectionParametersIConnection instance extends this.
It is a requirement that, if a connection is outbound (
IConnection.isOutbound()) and based on these parameters,
parameters.isEqual(connection) is true.
IConnectionParameters parameters = ...
broker.connect(parameters);
IConnection connection = ... // connection created by the broker
// this will be true
parameters.isEqual(connection);
isEqual in interface IConnectionParametersconnectionParameters - the other set of connection parameters to compare with this
true if the two parameters represent the same
connection attributesprotected void doDestroy()
AbstractLifeCycleRuntimeException or subclass
thereof.
doDestroy in class AbstractLifeCycleprotected void doStart()
AbstractLifeCycleRuntimeException or subclass
thereof. When this method is called, the AbstractLifeCycle.isActive() method will
return true.
doStart in class AbstractLifeCyclepublic String toString()
toString in class AbstractLifeCyclepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||