public interface Association
A protocol relationship between endpoints
The implementation of this interface is actual wrapper over Socket that know's how to communicate with peer. The user of Association shouldn't care if the underlying Socket is client or server side
| Modifier and Type | Method and Description |
|---|---|
void |
acceptAnonymousAssociation(AssociationListener associationListener)
Use this method only for accepting anonymous connections
from the ServerListener.onNewRemoteConnection() invoking
|
AssociationListener |
getAssociationListener()
The AssociationListener set for this Association
|
AssociationType |
getAssociationType()
Return the type of Association CLIENT or SERVER
|
java.lang.String[] |
getExtraHostAddresses()
When SCTP multi-homing configuration extra IP addresses are here
|
java.lang.String |
getHostAddress()
The host address that underlying socket is bound to
|
int |
getHostPort()
The host port that underlying socket is bound to
|
IpChannelType |
getIpChannelType()
Return the Association channel type TCP or SCTP
|
java.lang.String |
getName()
Each association has unique name
|
java.lang.String |
getPeerAddress()
The peer address that the underlying socket connects to
|
int |
getPeerPort()
The peer port that the underlying socket is connected to
|
java.lang.String |
getServerName()
Server name if the association is for
Server |
boolean |
isConnected()
If this association up (connection is established)
|
boolean |
isStarted()
If this association is started by management
|
void |
rejectAnonymousAssociation()
Use this method only for rejecting anonymous connections
from the ServerListener.onNewRemoteConnection() invoking
|
void |
send(PayloadData payloadData)
Send the
PayloadData to the peer |
void |
setAssociationListener(AssociationListener associationListener)
The
AssociationListener to be registered for this Association |
void |
stopAnonymousAssociation()
Stop the anonymous association.
|
IpChannelType getIpChannelType()
AssociationType getAssociationType()
java.lang.String getName()
boolean isStarted()
boolean isConnected()
AssociationListener getAssociationListener()
void setAssociationListener(AssociationListener associationListener)
AssociationListener to be registered for this AssociationassociationListener - java.lang.String getHostAddress()
int getHostPort()
java.lang.String getPeerAddress()
int getPeerPort()
java.lang.String getServerName()
Serverjava.lang.String[] getExtraHostAddresses()
void send(PayloadData payloadData) throws java.lang.Exception
PayloadData to the peerpayloadData - java.lang.Exceptionvoid acceptAnonymousAssociation(AssociationListener associationListener) throws java.lang.Exception
associationListener - java.lang.Exceptionvoid rejectAnonymousAssociation()
void stopAnonymousAssociation()
throws java.lang.Exception
java.lang.ExceptionCopyright © 2012. All Rights Reserved.