|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectgov.nist.javax.sip.stack.MessageChannel
gov.nist.javax.sip.stack.TCPMessageChannel
public final class TCPMessageChannel
This is stack for TCP connections. This abstracts a stream of parsed messages. The SIP stack starts this from the main SIPStack class for each connection that it accepts. It starts a message parser in its own thread and talks to the message parser via a pipe. The message parser calls back via the parseError or processMessage functions that are defined as part of the SIPMessageListener interface.
PipelinedMsgParser| メソッドの概要 | |
|---|---|
void |
close()
Close the message channel. |
boolean |
equals(java.lang.Object other)
Equals predicate. |
java.lang.String |
getKey()
Get an identifying key. |
java.lang.String |
getPeerAddress()
get the address of the client that sent the data to us. |
int |
getPeerPort()
Get the port of the peer to whom we are sending messages. |
java.lang.String |
getPeerProtocol()
|
SIPMessageStack |
getSIPStack()
Get my SIP Stack. |
java.lang.String |
getTransport()
get the transport string. |
java.lang.String |
getViaHost()
Get the host to assign to outgoing messages. |
int |
getViaPort()
Get the port for outgoing messages sent from the channel. |
void |
handleException(java.text.ParseException ex,
SIPMessage sipMessage,
java.lang.Class hdrClass,
java.lang.String header,
java.lang.String message)
Exception processor for exceptions detected from the parser. |
boolean |
isReliable()
Returns "true" as this is a reliable transport. |
boolean |
isSecure()
TCP Is not a secure protocol. |
void |
processMessage(SIPMessage sipMessage)
Gets invoked by the parser as a callback on successful message parsing (i.e. no parser errors). |
void |
run()
This gets invoked when thread.start is called from the constructor. |
void |
sendMessage(byte[] message,
java.net.InetAddress receiverAddress,
int receiverPort,
boolean retry)
Send a message to a specified address. |
void |
sendMessage(SIPMessage sipMessage)
Return a formatted message to the client. |
| クラス gov.nist.javax.sip.stack.MessageChannel から継承されたメソッド |
|---|
getHost, getHostPort, getKey, getKey, getMessageProcessor, getPeerHostPort, getPort, getRawIpSourceAddress, getViaHeader, getViaHostPort, logResponse, sendMessage |
| クラス java.lang.Object から継承されたメソッド |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| メソッドの詳細 |
|---|
public boolean isReliable()
MessageChannel 内の isReliablepublic void close()
MessageChannel 内の closepublic SIPMessageStack getSIPStack()
MessageChannel 内の getSIPStackpublic java.lang.String getTransport()
MessageChannel 内の getTransportpublic java.lang.String getPeerAddress()
MessageChannel 内の getPeerAddresspublic java.lang.String getPeerProtocol()
public void sendMessage(SIPMessage sipMessage)
throws java.io.IOException
MessageChannel 内の sendMessagesipMessage - Message to send.
java.io.IOException - If there is an error sending the message
public void sendMessage(byte[] message,
java.net.InetAddress receiverAddress,
int receiverPort,
boolean retry)
throws java.io.IOException
message - Pre-formatted message to send.receiverAddress - Address to send it to.receiverPort - Receiver port.
java.io.IOException - If there is a problem connecting or sending.
public void handleException(java.text.ParseException ex,
SIPMessage sipMessage,
java.lang.Class hdrClass,
java.lang.String header,
java.lang.String message)
throws java.text.ParseException
ParseExceptionListener 内の handleExceptionsipMessage - -- the message that incurred the error.ex - -- parse exception detected by the parser.header - -- header that caused the error.message - -- message where this header was detected.
java.text.ParseException - Thrown if we want to reject the message.
public void processMessage(SIPMessage sipMessage)
throws java.lang.Exception
SIPMessageListener 内の processMessagesipMessage - Mesage to process (this calls the application
for processing the message).
java.lang.Exceptionfor the method that gets called
on parse exception.public void run()
java.lang.Runnable 内の runpublic boolean equals(java.lang.Object other)
java.lang.Object 内の equalsother - is the other object to compare ourselves to for equalspublic java.lang.String getKey()
MessageChannel 内の getKeypublic java.lang.String getViaHost()
MessageChannel 内の getViaHostpublic int getViaPort()
MessageChannel 内の getViaPortpublic int getPeerPort()
MessageChannel 内の getPeerPortpublic boolean isSecure()
MessageChannel 内の isSecure
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||