gov.nist.javax.sip.stack
クラス TCPMessageProcessor

java.lang.Object
  上位を拡張 gov.nist.javax.sip.stack.MessageProcessor
      上位を拡張 gov.nist.javax.sip.stack.TCPMessageProcessor
すべての実装されたインタフェース:
java.lang.Runnable

public class TCPMessageProcessor
extends MessageProcessor

Sit in a loop waiting for incoming tcp connections and start a new thread to handle each new connection. This is the active object that creates new TCP MessageChannels (one for each new accept socket).

バージョン:
JAIN-SIP-1.1 $Revision: 1.21 $ $Date: 2004/09/04 14:59:54 $
作成者:
M. Ranganathan
Acknowledgement: Jeff Keyser suggested that a Stop mechanism be added to this. Niklas Uhrberg suggested that a means to limit the number of simultaneous active connections should be added. Mike Andrews suggested that the thread be accessible so as to implement clean stop using Thread.join(). This code is in the public domain.

メソッドの概要
 MessageChannel createMessageChannel(HostPort targetHostPort)
          Create a message channel for the specified host/port.
 MessageChannel createMessageChannel(java.net.InetAddress host, int port)
          Create a message channel for the specified host/port.
 int getDefaultTargetPort()
          Default target port for TCP
 int getMaximumMessageSize()
          TCP can handle an unlimited number of bytes.
 java.lang.String getNAPTRService()
          TCP NAPTR service name.
 int getPort()
          Returns the port that we are listening on.
 SIPMessageStack getSIPStack()
          Returns the stack.
 java.lang.String getSRVPrefix()
          TCP SRV prefix.
 java.lang.Thread getThread()
          Return our thread.
 java.lang.String getTransport()
          Return the transport string.
 boolean inUse()
          Return true if there are pending messages to be processed (which prevents the message channel from being closed).
 boolean isSecure()
          TCP is not a secure protocol.
 void run()
          Run method for the thread that gets created for each accept socket.
 void start()
          Start the processor.
 void stop()
          Stop the message processor.
 
クラス gov.nist.javax.sip.stack.MessageProcessor から継承されたメソッド
getViaHeader
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

start

public void start()
           throws java.io.IOException
Start the processor.

定義:
クラス MessageProcessor 内の start
例外:
java.io.IOException

getThread

public java.lang.Thread getThread()
Return our thread.

定義:
クラス MessageProcessor 内の getThread
戻り値:
-- our thread. This is used for joining

run

public void run()
Run method for the thread that gets created for each accept socket.

定義:
インタフェース java.lang.Runnable 内の run
定義:
クラス MessageProcessor 内の run

getTransport

public java.lang.String getTransport()
Return the transport string.

定義:
クラス MessageProcessor 内の getTransport
戻り値:
the transport string

getPort

public int getPort()
Returns the port that we are listening on.

定義:
クラス MessageProcessor 内の getPort
戻り値:
Port address for the tcp accept.

getSIPStack

public SIPMessageStack getSIPStack()
Returns the stack.

定義:
クラス MessageProcessor 内の getSIPStack
戻り値:
my sip stack.

stop

public void stop()
Stop the message processor. Feature suggested by Jeff Keyser.

定義:
クラス MessageProcessor 内の stop

createMessageChannel

public MessageChannel createMessageChannel(HostPort targetHostPort)
                                    throws java.io.IOException
クラス MessageProcessor の記述:
Create a message channel for the specified host/port.

定義:
クラス MessageProcessor 内の createMessageChannel
戻り値:
New MessageChannel for this processor.
例外:
java.io.IOException

createMessageChannel

public MessageChannel createMessageChannel(java.net.InetAddress host,
                                           int port)
                                    throws java.io.IOException
クラス MessageProcessor の記述:
Create a message channel for the specified host/port.

定義:
クラス MessageProcessor 内の createMessageChannel
戻り値:
New MessageChannel for this processor.
例外:
java.io.IOException

getMaximumMessageSize

public int getMaximumMessageSize()
TCP can handle an unlimited number of bytes.

定義:
クラス MessageProcessor 内の getMaximumMessageSize

getNAPTRService

public java.lang.String getNAPTRService()
TCP NAPTR service name.


getSRVPrefix

public java.lang.String getSRVPrefix()
TCP SRV prefix.


inUse

public boolean inUse()
クラス MessageProcessor の記述:
Return true if there are pending messages to be processed (which prevents the message channel from being closed).

定義:
クラス MessageProcessor 内の inUse

getDefaultTargetPort

public int getDefaultTargetPort()
Default target port for TCP

定義:
クラス MessageProcessor 内の getDefaultTargetPort

isSecure

public boolean isSecure()
TCP is not a secure protocol.

定義:
クラス MessageProcessor 内の isSecure