|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fulmine.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 connectionMethod Detail |
---|
public final String getRemoteContextIdentity()
IConnectionParameters
IFrameworkContext
at the remote end of
the connection
getRemoteContextIdentity
in interface IConnectionParameters
protected String getRemoteHostAddress()
IConnectionBroker
protected int getRemoteHostTcpPort()
IConnectionBroker
protected 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 IConnectionParameters
public boolean isEqual(IConnectionParameters connectionParameters)
IConnectionParameters
IConnection
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 IConnectionParameters
connectionParameters
- the other set of connection parameters to compare with this
true
if the two parameters represent the same
connection attributesprotected void doDestroy()
AbstractLifeCycle
RuntimeException
or subclass
thereof.
doDestroy
in class AbstractLifeCycle
protected void doStart()
AbstractLifeCycle
RuntimeException
or subclass
thereof. When this method is called, the AbstractLifeCycle.isActive()
method will
return true
.
doStart
in class AbstractLifeCycle
public String toString()
toString
in class AbstractLifeCycle
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |