public class TLSClientConnection extends Object implements IConnection
| Constructor and Description |
|---|
TLSClientConnection(Configuration config,
Configuration localPeerSSLConfig,
IConcurrentFactory concurrentFactory,
Socket socket,
IMessageParser parser) |
TLSClientConnection(Configuration config,
IConcurrentFactory concurrentFactory,
InetAddress remoteAddress,
int remotePort,
InetAddress localAddress,
int localPort,
IConnectionListener listener,
IMessageParser parser,
String ref) |
TLSClientConnection(Configuration config,
IConcurrentFactory concurrentFactory,
InetAddress remoteAddress,
int remotePort,
InetAddress localAddress,
int localPort,
IMessageParser parser,
String ref) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(IConnectionListener listener)
Append connection listener
|
void |
connect()
Connect with remote host
|
void |
disconnect()
Disconnect wit remote host
|
protected TLSTransportClient |
getClient() |
long |
getCreatedTime()
Return created time
|
String |
getKey()
Return identifier of connection.
|
InetAddress |
getRemoteAddress()
Return remote host address
|
int |
getRemotePort()
Return remote socket port
|
Configuration |
getSSLConfig() |
SSLSocketFactory |
getSSLFactory() |
boolean |
isConnected()
Return true if is connection is valid
|
boolean |
isNetworkInitiated()
Return true if connection is incomming
|
boolean |
isWrapperFor(Class<?> aClass) |
protected void |
onAvpDataException(AvpDataException e) |
protected void |
onConnected() |
protected void |
onDisconnect() |
protected void |
onEvent(org.jdiameter.client.impl.transport.tls.TLSClientConnection.Event event) |
protected void |
onMessageReceived(IMessage message) |
protected boolean |
processBufferedMessages(org.jdiameter.client.impl.transport.tls.TLSClientConnection.Event event) |
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) |
public TLSClientConnection(Configuration config, IConcurrentFactory concurrentFactory, InetAddress remoteAddress, int remotePort, InetAddress localAddress, int localPort, IMessageParser parser, String ref)
public TLSClientConnection(Configuration config, IConcurrentFactory concurrentFactory, InetAddress remoteAddress, int remotePort, InetAddress localAddress, int localPort, IConnectionListener listener, IMessageParser parser, String ref)
public TLSClientConnection(Configuration config, Configuration localPeerSSLConfig, IConcurrentFactory concurrentFactory, Socket socket, IMessageParser parser) throws Exception
Exceptionprotected TLSTransportClient getClient()
public Configuration getSSLConfig()
public SSLSocketFactory getSSLFactory()
public long getCreatedTime()
IConnectiongetCreatedTime 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 void release()
throws IOException
IConnectionrelease in interface IConnectionIOExceptionpublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface WrapperInternalExceptionpublic boolean isConnected()
IConnectionisConnected in interface IConnectionpublic boolean isNetworkInitiated()
IConnectionisNetworkInitiated in interface IConnectionpublic String getKey()
IConnectiongetKey in interface IConnectionpublic void connect()
throws TransportException
IConnectionconnect in interface IConnectionTransportExceptionpublic void disconnect()
throws InternalError
IConnectiondisconnect in interface IConnectionInternalErrorpublic void sendMessage(IMessage message) throws TransportException, OverloadException
IConnectionsendMessage in interface IConnectionmessage - diameter messageTransportExceptionOverloadExceptionprotected void onDisconnect()
throws AvpDataException
AvpDataExceptionprotected void onMessageReceived(IMessage message) throws AvpDataException
AvpDataExceptionprotected void onAvpDataException(AvpDataException e)
protected void onConnected()
protected void onEvent(org.jdiameter.client.impl.transport.tls.TLSClientConnection.Event event)
throws AvpDataException
AvpDataExceptionprotected boolean processBufferedMessages(org.jdiameter.client.impl.transport.tls.TLSClientConnection.Event event)
throws AvpDataException
AvpDataExceptionCopyright © 2016. All Rights Reserved.