|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.javax.sip.stack.IOHandler
public class IOHandler
Low level Input output to a socket. Caches TCP connections and takes care of re-connecting to the remote party if the other end drops the connection
| Method Summary | |
|---|---|
void |
closeAll()
Close all the cached connections. |
SocketAddress |
getLocalAddressForTcpDst(InetAddress dst,
int dstPort,
InetAddress localAddress,
int localPort)
Creates and binds, if necessary, a socket connected to the specified destination address and port and then returns its local address. |
SocketAddress |
getLocalAddressForTlsDst(InetAddress dst,
int dstPort,
InetAddress localAddress,
TLSMessageChannel channel)
Creates and binds, if necessary, a socket connected to the specified destination address and port and then returns its local address. |
Socket |
sendBytes(InetAddress senderAddress,
InetAddress receiverAddress,
int contactPort,
String transport,
byte[] bytes,
boolean isClient,
MessageChannel messageChannel)
Send an array of bytes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public SocketAddress getLocalAddressForTcpDst(InetAddress dst,
int dstPort,
InetAddress localAddress,
int localPort)
throws IOException
dst - the destination address that the socket would need to connect
to.dstPort - the port number that the connection would be established with.localAddress - the address that we would like to bind on (null for the "any"
address).localPort - the port that we'd like our socket to bind to (0 for a random
port).
IOException - if we fail binding the socket
public SocketAddress getLocalAddressForTlsDst(InetAddress dst,
int dstPort,
InetAddress localAddress,
TLSMessageChannel channel)
throws IOException
dst - the destination address that the socket would need to connect
to.dstPort - the port number that the connection would be established
with.localAddress - the address that we would like to bind on (null for
the "any" address).channel - the message channel that will be servicing the socket
IOException - if we fail binding the socket
public Socket sendBytes(InetAddress senderAddress,
InetAddress receiverAddress,
int contactPort,
String transport,
byte[] bytes,
boolean isClient,
MessageChannel messageChannel)
throws IOException
receiverAddress - -- inet addresscontactPort - -- port to connect to.transport - -- tcp or udp.isClient - -- retry to connect if the other end closed connection
IOException - -- if there is an IO exception sending message.public void closeAll()
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||