|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdiameter.client.impl.transport.tcp.TCPClientConnection
public class TCPClientConnection
| Field Summary | |
|---|---|
protected java.util.concurrent.ConcurrentLinkedQueue<IConnectionListener> |
listeners
|
protected IMessageParser |
parser
|
protected java.lang.Object |
zero
|
| Constructor Summary | |
|---|---|
|
TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.InetAddress address,
int port,
IConnectionListener listener,
IMessageParser parser,
java.lang.String ref)
|
|
TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.InetAddress address,
int port,
IMessageParser parser,
java.lang.String ref)
|
|
TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.Socket socket,
IMessageParser p,
java.lang.String ref)
|
protected |
TCPClientConnection(IMessageParser parser)
|
| Method Summary | ||
|---|---|---|
void |
addConnectionListener(IConnectionListener connectionListener)
Append connection listener |
|
void |
connect()
Connect with remote host |
|
void |
disconnect()
Disconnect wit remote host |
|
protected org.jdiameter.client.impl.transport.tcp.TCPTransportClient |
getClient()
|
|
java.lang.String |
getKey()
Return identifier of connection. |
|
java.net.InetAddress |
getRemoteAddress()
Return remote host address |
|
int |
getRemotePort()
Return remote socket port |
|
boolean |
isConnected()
Return true if is connection is valid |
|
boolean |
isNetworkInitiated()
Return true if connection is incomming |
|
boolean |
isWrapperFor(java.lang.Class<?> aClass)
|
|
void |
release()
Clear all attachec resources (close socket) |
|
void |
remConnectionListener(IConnectionListener connectionListener)
Remove connection listener |
|
void |
sendMessage(IMessage message)
Send message to remote host |
|
|
unwrap(java.lang.Class<T> aClass)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IMessageParser parser
protected final java.lang.Object zero
protected java.util.concurrent.ConcurrentLinkedQueue<IConnectionListener> listeners
| Constructor Detail |
|---|
protected TCPClientConnection(IMessageParser parser)
public TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.Socket socket,
IMessageParser p,
java.lang.String ref)
throws java.lang.Exception
java.lang.Exception
public TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.InetAddress address,
int port,
IMessageParser parser,
java.lang.String ref)
public TCPClientConnection(org.jdiameter.api.Configuration config,
java.net.InetAddress address,
int port,
IConnectionListener listener,
IMessageParser parser,
java.lang.String ref)
| Method Detail |
|---|
public void connect()
throws TransportException
IConnection
connect in interface IConnectionTransportException
public void disconnect()
throws java.lang.InternalError
IConnection
disconnect in interface IConnectionjava.lang.InternalError
public void release()
throws java.io.IOException
IConnection
release in interface IConnectionjava.io.IOException
public void sendMessage(IMessage message)
throws TransportException,
org.jdiameter.api.OverloadException
IConnection
sendMessage in interface IConnectionmessage - diameter message
TransportException
org.jdiameter.api.OverloadExceptionprotected org.jdiameter.client.impl.transport.tcp.TCPTransportClient getClient()
public boolean isNetworkInitiated()
IConnection
isNetworkInitiated in interface IConnectionpublic boolean isConnected()
IConnection
isConnected in interface IConnectionpublic java.net.InetAddress getRemoteAddress()
IConnection
getRemoteAddress in interface IConnectionpublic int getRemotePort()
IConnection
getRemotePort in interface IConnectionpublic void addConnectionListener(IConnectionListener connectionListener)
IConnection
addConnectionListener in interface IConnectionconnectionListener - listener instancepublic void remConnectionListener(IConnectionListener connectionListener)
IConnection
remConnectionListener in interface IConnectionconnectionListener - listener instance
public boolean isWrapperFor(java.lang.Class<?> aClass)
throws org.jdiameter.api.InternalException
isWrapperFor in interface org.jdiameter.api.Wrapperorg.jdiameter.api.InternalException
public <T> T unwrap(java.lang.Class<T> aClass)
throws org.jdiameter.api.InternalException
unwrap in interface org.jdiameter.api.Wrapperorg.jdiameter.api.InternalExceptionpublic java.lang.String getKey()
IConnection
getKey in interface IConnection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||