|
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.MessageChannel
gov.nist.javax.sip.stack.UDPMessageChannel
This is the UDP Message handler that gets created when a UDP message needs to be processed. The message is processed by creating a String Message parser and invoking it on the message read from the UDP socket. The parsed structure is handed off via a SIP stack request for further processing. This stack structure isolates the message handling logic from the mechanics of sending and recieving messages (which could be either udp or tcp.
| Method Summary | |
void |
close()
Close the message channel. |
boolean |
equals(Object other)
Compare two UDP Message channels for equality. |
String |
getHost()
get the stack address for the stack that received this message. |
String |
getKey()
Generate a key which identifies the message channel. |
String |
getPeerAddress()
get the address of the host that sent me the message |
String |
getPeerName()
get the name (address) of the host that sent me the message |
InetAddress |
getPeerPacketSourceAddress()
|
int |
getPeerPacketSourcePort()
|
int |
getPeerPort()
Get the sender port ( the port of the other end that sent me the message). |
String |
getPeerProtocol()
|
int |
getPort()
get the port. |
SIPTransactionStack |
getSIPStack()
get the stack pointer. |
String |
getTransport()
Return a transport string. |
String |
getViaHost()
Get the logical originator of the message (from the top via header). |
int |
getViaPort()
Get the logical port of the message orginator (from the top via hdr). |
void |
handleException(ParseException ex,
SIPMessage sipMessage,
Class hdrClass,
String header,
String message)
Implementation of the ParseExceptionListener interface. |
boolean |
isReliable()
Returns "false" as this is an unreliable transport. |
boolean |
isSecure()
UDP is not a secure protocol. |
void |
run()
Run method specified by runnnable. |
void |
sendMessage(SIPMessage sipMessage)
Return a reply from a pre-constructed reply. |
| Methods inherited from class gov.nist.javax.sip.stack.MessageChannel |
getHostPort, getKey, getKey, getMessageProcessor, getPeerHostPort, getRawIpSourceAddress, getViaHeader, getViaHostPort, logResponse, sendMessage |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void run()
run in interface Runnable
public void handleException(ParseException ex,
SIPMessage sipMessage,
Class hdrClass,
String header,
String message)
throws ParseException
handleException in interface ParseExceptionListenerex - Exception that is given to us by the parser.sipMessage - -- sip message being processed.header - -- header/RL/SL text being parsed.message - -- message where this header was detected.
ParseException - If we choose to reject the header or message.
public void sendMessage(SIPMessage sipMessage)
throws IOException
sendMessage in class MessageChannelsipMessage - Message string to send.
IOException - If there is a problem with sending the message.public SIPTransactionStack getSIPStack()
getSIPStack in class MessageChannelpublic String getTransport()
getTransport in class MessageChannelpublic String getHost()
getHost in class MessageChannelpublic int getPort()
getPort in class MessageChannelpublic String getPeerName()
public String getPeerAddress()
getPeerAddress in class MessageChannelpublic boolean equals(Object other)
other - The other message channel with which to compare oursleves.public String getKey()
MessageChannel
getKey in class MessageChannelpublic int getPeerPacketSourcePort()
getPeerPacketSourcePort in class MessageChannelpublic InetAddress getPeerPacketSourceAddress()
getPeerPacketSourceAddress in class MessageChannelpublic String getViaHost()
getViaHost in class MessageChannelpublic int getViaPort()
getViaPort in class MessageChannelpublic boolean isReliable()
isReliable in class MessageChannelpublic boolean isSecure()
isSecure in class MessageChannelpublic int getPeerPort()
MessageChannel
getPeerPort in class MessageChannelpublic String getPeerProtocol()
public void close()
close in class MessageChannel
|
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 | ||||||||||