|
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.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 UPD 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.
StringMsgParser
,
SIPServerRequestInterface
Field Summary | |
static String |
SIPHEADERS_PACKAGE
|
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 |
int |
getPeerPort()
Get the sender port ( the port of the other end that sent me the message). |
int |
getPort()
get the port. |
SIPStack |
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,
gov.nist.javax.sip.message.SIPMessage sipMessage,
Class hdrClass,
String header,
String message)
Implementation of the ParseExceptionListener interface. |
void |
handleException(SIPServerException ex)
Handle an exception - construct a sip reply and send it back to the caller. |
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(gov.nist.javax.sip.message.SIPMessage sipMessage)
Return a reply from a pre-constructed reply. |
Methods inherited from class gov.nist.javax.sip.stack.MessageChannel |
getHostPort, getKey, getMessageProcessor, getPeerHostPort, getRawIpSourceAddress, getViaHeader, getViaHostPort, logResponse, sendMessage |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SIPHEADERS_PACKAGE
Method Detail |
public void run()
run
in interface Runnable
public void handleException(ParseException ex, gov.nist.javax.sip.message.SIPMessage sipMessage, Class hdrClass, String header, String message) throws ParseException
handleException
in interface ParseExceptionListener
ex
- 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(gov.nist.javax.sip.message.SIPMessage sipMessage) throws IOException
sendMessage
in class MessageChannel
sipMessage
- Message to send.
IOException
- If there is a problem with sending the
message.public SIPStack getSIPStack()
getSIPStack
in class MessageChannel
public String getTransport()
getTransport
in class MessageChannel
public String getHost()
getHost
in class MessageChannel
public int getPort()
getPort
in class MessageChannel
public void handleException(SIPServerException ex)
handleException
in class MessageChannel
ex
- The exception thrown at us by our
application.public String getPeerName()
getPeerName
in class MessageChannel
public String getPeerAddress()
getPeerAddress
in class MessageChannel
public boolean equals(Object other)
equals
in class Object
other
- The other message channel with which to compare oursleves.public String getKey()
MessageChannel
getKey
in class MessageChannel
public String getViaHost()
getViaHost
in class MessageChannel
public int getViaPort()
getViaPort
in class MessageChannel
public boolean isReliable()
isReliable
in class MessageChannel
public boolean isSecure()
isSecure
in class MessageChannel
public int getPeerPort()
MessageChannel
getPeerPort
in class MessageChannel
public void close()
close
in class MessageChannel
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |