public class AssociationImpl extends Object implements Association
| Modifier and Type | Field and Description |
|---|---|
protected static javolution.xml.XMLFormat<AssociationImpl> |
ASSOCIATION_XML
XML Serialization/Deserialization
|
protected org.mobicents.protocols.sctp.AssociationHandler |
associationHandler |
protected static org.apache.log4j.Logger |
logger |
protected SocketAddress |
peerSocketAddress
This is used only for SCTP This is the socket address for peer which will
be null initially.
|
protected boolean |
up |
| Modifier | Constructor and Description |
|---|---|
|
AssociationImpl() |
|
AssociationImpl(String hostAddress,
int hostPort,
String peerAddress,
int peerPort,
String assocName,
IpChannelType ipChannelType,
String[] extraHostAddresses)
Creating a CLIENT Association
|
protected |
AssociationImpl(String peerAddress,
int peerPort,
String serverName,
IpChannelType ipChannelType,
ServerImpl server)
Creating an ANONYMOUS_SERVER Association
|
|
AssociationImpl(String peerAddress,
int peerPort,
String serverName,
String assocName,
IpChannelType ipChannelType)
Creating a SERVER Association
|
protected static final org.apache.log4j.Logger logger
protected final org.mobicents.protocols.sctp.AssociationHandler associationHandler
protected volatile SocketAddress peerSocketAddress
protected volatile boolean up
protected static final javolution.xml.XMLFormat<AssociationImpl> ASSOCIATION_XML
public AssociationImpl()
public AssociationImpl(String hostAddress, int hostPort, String peerAddress, int peerPort, String assocName, IpChannelType ipChannelType, String[] extraHostAddresses) throws IOException
hostAddress - hostPort - peerAddress - peerPort - assocName - ipChannelType - extraHostAddresses - IOExceptionpublic AssociationImpl(String peerAddress, int peerPort, String serverName, String assocName, IpChannelType ipChannelType)
peerAddress - peerPort - serverName - assocName - ipChannelType - protected AssociationImpl(String peerAddress, int peerPort, String serverName, IpChannelType ipChannelType, ServerImpl server)
hostAddress - hostPort - peerAddress - peerPort - serverName - assocName - ipChannelType - protected void stop()
throws Exception
Exceptionpublic void acceptAnonymousAssociation(AssociationListener associationListener) throws Exception
acceptAnonymousAssociation in interface AssociationExceptionpublic void rejectAnonymousAssociation()
rejectAnonymousAssociation in interface Associationpublic void stopAnonymousAssociation()
throws Exception
stopAnonymousAssociation in interface AssociationExceptionpublic IpChannelType getIpChannelType()
getIpChannelType in interface Associationpublic AssociationListener getAssociationListener()
getAssociationListener in interface Associationpublic void setAssociationListener(AssociationListener associationListener)
setAssociationListener in interface AssociationassociationListener - the associationListener to setpublic String getName()
getName in interface Associationpublic AssociationType getAssociationType()
getAssociationType in interface Associationpublic boolean isStarted()
isStarted in interface Associationpublic boolean isConnected()
isConnected in interface Associationpublic boolean isUp()
isUp in interface Associationprotected void markAssociationUp()
protected void markAssociationDown()
public String getHostAddress()
getHostAddress in interface Associationpublic int getHostPort()
getHostPort in interface Associationpublic String getPeerAddress()
getPeerAddress in interface Associationpublic int getPeerPort()
getPeerPort in interface Associationpublic String getServerName()
getServerName in interface Associationpublic String[] getExtraHostAddresses()
getExtraHostAddresses in interface Associationprotected void setManagement(ManagementImpl management)
management - the management to setprotected void setSocketChannel(AbstractSelectableChannel socketChannel)
socketChannel - the socketChannel to setpublic void send(PayloadData payloadData) throws Exception
send in interface AssociationExceptionprotected void read()
protected void write(SelectionKey key)
protected void close()
protected void scheduleConnect()
protected void initiateConnection()
throws IOException
IOExceptionprotected void createworkerThreadTable(int maximumBooundStream)
Copyright © 2015. All Rights Reserved.