public class SCTPServerConnection extends Object implements IConnection
| Modifier | Constructor and Description |
|---|---|
|
SCTPServerConnection(Configuration config,
InetAddress localAddress,
int localPort,
IMessageParser parser,
String ref,
NetworkGuard guard) |
|
SCTPServerConnection(Configuration config,
InetAddress remoteAddress,
int remotePort,
InetAddress localAddress,
int localPort,
IMessageParser parser,
String ref,
NetworkGuard guard,
org.mobicents.protocols.api.Server globalServer,
org.mobicents.protocols.api.Association association,
org.mobicents.protocols.api.Management management) |
protected |
SCTPServerConnection(IMessageParser parser,
NetworkGuard guard) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(IConnectionListener listener)
Append connection listener
|
void |
connect()
Connect with remote host
|
void |
destroy() |
void |
disconnect()
Disconnect wit remote host
|
long |
getCreatedTime()
Return created time
|
String |
getKey()
Return identifier of connection.
|
org.mobicents.protocols.api.Management |
getManagement() |
NetworkGuard |
getParentGuard() |
InetAddress |
getRemoteAddress()
Return remote host address
|
int |
getRemotePort()
Return remote socket port
|
protected SCTPTransportServer |
getServer() |
boolean |
isConnected()
Return true if is connection is valid
|
boolean |
isNetworkInitiated()
Return true if connection is incomming
|
boolean |
isWrapperFor(Class<?> aClass) |
protected void |
logDetails() |
protected void |
onAvpDataException(AvpDataException e) |
protected void |
onConnected() |
protected void |
onDisconnect() |
protected void |
onEvent(org.jdiameter.server.impl.io.sctp.SCTPServerConnection.Event event) |
protected void |
onMessageReceived(ByteBuffer message) |
void |
onNewRemoteConnection(org.mobicents.protocols.api.Server server,
org.mobicents.protocols.api.Association association) |
void |
release()
Clear all attachec resources (close socket)
|
void |
remAllConnectionListener()
Remove all connection listeners
|
void |
remConnectionListener(IConnectionListener listener)
Remove connection listener
|
void |
sendMessage(IMessage message)
Send message to remote host
|
<T> T |
unwrap(Class<T> aClass) |
protected SCTPServerConnection(IMessageParser parser, NetworkGuard guard)
public SCTPServerConnection(Configuration config, InetAddress localAddress, int localPort, IMessageParser parser, String ref, NetworkGuard guard) throws Exception
Exceptionpublic SCTPServerConnection(Configuration config, InetAddress remoteAddress, int remotePort, InetAddress localAddress, int localPort, IMessageParser parser, String ref, NetworkGuard guard, org.mobicents.protocols.api.Server globalServer, org.mobicents.protocols.api.Association association, org.mobicents.protocols.api.Management management) throws Exception
Exceptionpublic long getCreatedTime()
IConnectiongetCreatedTime in interface IConnectionpublic void connect()
throws TransportException
IConnectionconnect in interface IConnectionTransportExceptionpublic void disconnect()
throws InternalError
IConnectiondisconnect in interface IConnectionInternalErrorpublic org.mobicents.protocols.api.Management getManagement()
public void destroy()
throws InternalError
InternalErrorpublic void release()
throws IOException
IConnectionrelease in interface IConnectionIOExceptionpublic void onNewRemoteConnection(org.mobicents.protocols.api.Server server,
org.mobicents.protocols.api.Association association)
public NetworkGuard getParentGuard()
public void sendMessage(IMessage message) throws TransportException, OverloadException
IConnectionsendMessage in interface IConnectionmessage - diameter messageTransportExceptionOverloadExceptionprotected SCTPTransportServer getServer()
public boolean isNetworkInitiated()
IConnectionisNetworkInitiated in interface IConnectionpublic boolean isConnected()
IConnectionisConnected in interface IConnectionpublic InetAddress getRemoteAddress()
IConnectiongetRemoteAddress in interface IConnectionpublic int getRemotePort()
IConnectiongetRemotePort in interface IConnectionpublic void addConnectionListener(IConnectionListener listener)
IConnectionaddConnectionListener in interface IConnectionlistener - listener instancepublic void remAllConnectionListener()
IConnectionremAllConnectionListener in interface IConnectionpublic void remConnectionListener(IConnectionListener listener)
IConnectionremConnectionListener in interface IConnectionlistener - listener instancepublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface WrapperInternalExceptionpublic String getKey()
IConnectiongetKey in interface IConnectionprotected void onDisconnect()
throws AvpDataException
AvpDataExceptionprotected void onMessageReceived(ByteBuffer message) throws AvpDataException
AvpDataExceptionprotected void onAvpDataException(AvpDataException e)
protected void onConnected()
protected void logDetails()
throws AvpDataException
AvpDataExceptionprotected void onEvent(org.jdiameter.server.impl.io.sctp.SCTPServerConnection.Event event)
throws AvpDataException
AvpDataExceptionCopyright © 2016. All Rights Reserved.