|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.javax.sip.stack.IOHandler
Class that is used for forwarding SIP requests.
Constructor Summary | |
IOHandler()
|
Method Summary | |
static Socket |
sendBytes(InetAddress inaddr,
int contactPort,
String transport,
byte[] bytes)
Forward a given request to the address given. |
static void |
sendRequest(AddressImpl addr,
String request)
Forward a given request to the address given. |
static void |
sendRequest(HostPort addr,
String transport,
String nrequest)
Forward a given request to the address given. |
static void |
sendRequest(InetAddress inaddr,
int contactPort,
String transport,
String request)
Forward a given request to the address given. |
static void |
sendRequest(String host,
int port,
String transport,
SIPStack stack,
gov.nist.javax.sip.message.SIPMessage message)
Send a request when you have a host and port string |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IOHandler()
Method Detail |
public static void sendRequest(AddressImpl addr, String request) throws IOException
addr
- is the address to which to send the request torequest
- is the request that is being forwarded
If the address does not specify a transport, we
try UDP first and if this fails, then try TCP.
IOException
- If the message could not be sent for any
reasonpublic static void sendRequest(HostPort addr, String transport, String nrequest) throws IOException
addr
- is the address to which to send the request.transport
- is the transport string udp or tcp.nrequest
- is the request that is being forwarded
For udp we do a connect and a send as specified in tbe RFC
so that an error is returned immediately if the other end is
not listening
IOException
- If the message could not be sent for any reasonpublic static Socket sendBytes(InetAddress inaddr, int contactPort, String transport, byte[] bytes) throws IOException
inaddr
- is the address to which to send the request.transport
- is the transport string udp or tcp.
IOException
- If the message could not be sent for any reasonpublic static void sendRequest(InetAddress inaddr, int contactPort, String transport, String request) throws IOException
inaddr
- is the address to which to send the request.transport
- is the transport string udp or tcp.
IOException
- If the message could not be sent for any reasonpublic static void sendRequest(String host, int port, String transport, SIPStack stack, gov.nist.javax.sip.message.SIPMessage message) throws IOException
host
- is the host name/addressport
- is the portstack
- is the sipStack from where this message is
originating (for logging purposes).message
- is the SIP message that we are forwardiong.
IOException
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |