|
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
public abstract class MessageChannel
Message channel abstraction for the SIP stack.
Constructor Summary | |
---|---|
MessageChannel()
|
Method Summary | |
---|---|
abstract void |
close()
Close the message channel. |
String |
getHost()
Get the host of this message channel. |
gov.nist.core.HostPort |
getHostPort()
Get the hostport structure of this message channel. |
abstract String |
getKey()
Generate a key which identifies the message channel. |
static String |
getKey(gov.nist.core.HostPort hostPort,
String transport)
Generate a key given host and port. |
static String |
getKey(InetAddress inetAddr,
int port,
String transport)
generate a key given the inet address port and transport. |
MessageProcessor |
getMessageProcessor()
Get the message processor. |
abstract String |
getPeerAddress()
Get the peer address of the machine that sent us this message. |
gov.nist.core.HostPort |
getPeerHostPort()
Get the peer host and port. |
abstract InetAddress |
getPeerPacketSourceAddress()
|
abstract int |
getPeerPacketSourcePort()
|
abstract int |
getPeerPort()
Get the sender port ( the port of the other end that sent me the message). |
int |
getPort()
Get port of this message channel. |
String |
getRawIpSourceAddress()
Convenience function to get the raw IP source address of a SIP message as a String. |
abstract SIPTransactionStack |
getSIPStack()
Get the SIPStack object from this message channel. |
abstract String |
getTransport()
Get transport string of this message channel. |
Via |
getViaHeader()
Get the Via header for this transport. |
abstract String |
getViaHost()
Get the host to assign for an outgoing Request via header. |
gov.nist.core.HostPort |
getViaHostPort()
Get the via header host:port structure. |
abstract int |
getViaPort()
Get the port to assign for the via header of an outgoing message. |
abstract boolean |
isReliable()
Get whether this channel is reliable or not. |
abstract boolean |
isSecure()
Return true if this is a secure channel. |
void |
logResponse(SIPResponse sipResponse,
long receptionTime,
String status)
Log a response received at this message channel. |
abstract void |
sendMessage(SIPMessage sipMessage)
Send the message (after it has been formatted) |
void |
sendMessage(SIPMessage sipMessage,
Hop hop)
Send a formatted message to the specified target. |
void |
sendMessage(SIPMessage sipMessage,
InetAddress receiverAddress,
int receiverPort)
Send a message given SIP message. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageChannel()
Method Detail |
---|
public abstract void close()
public abstract SIPTransactionStack getSIPStack()
public abstract String getTransport()
public abstract boolean isReliable()
public abstract boolean isSecure()
public abstract void sendMessage(SIPMessage sipMessage) throws IOException
sipMessage
- Message to send.
IOException
public abstract String getPeerAddress()
public abstract int getPeerPort()
public abstract int getPeerPacketSourcePort()
public abstract InetAddress getPeerPacketSourceAddress()
public abstract String getKey()
public abstract String getViaHost()
public abstract int getViaPort()
public String getHost()
public int getPort()
public void sendMessage(SIPMessage sipMessage, Hop hop) throws IOException
sipMessage
- Message to send.hop
- hop to send it to.
IOException
- If there is an error sending the messagepublic void sendMessage(SIPMessage sipMessage, InetAddress receiverAddress, int receiverPort) throws IOException
sipMessage
- is the messge to send.receiverAddress
- is the address to which we want to sendreceiverPort
- is the port to which we want to send
IOException
public String getRawIpSourceAddress()
public static String getKey(InetAddress inetAddr, int port, String transport)
public static String getKey(gov.nist.core.HostPort hostPort, String transport)
public gov.nist.core.HostPort getHostPort()
public gov.nist.core.HostPort getPeerHostPort()
public Via getViaHeader()
public gov.nist.core.HostPort getViaHostPort()
public void logResponse(SIPResponse sipResponse, long receptionTime, String status)
receptionTime
- is the time at which the response was received.status
- is the processing status of the message.public MessageProcessor getMessageProcessor()
|
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 |