gov.nist.javax.sip.stack
Class ConnectionOrientedMessageProcessor

java.lang.Object
  extended by gov.nist.javax.sip.stack.MessageProcessor
      extended by gov.nist.javax.sip.stack.ConnectionOrientedMessageProcessor
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
TCPMessageProcessor, TLSMessageProcessor

public abstract class ConnectionOrientedMessageProcessor
extends MessageProcessor

Author:
[email protected]

Field Summary
protected  Map<String,ConnectionOrientedMessageChannel> incomingMessageChannels
           
protected  boolean isRunning
           
protected  Map<String,ConnectionOrientedMessageChannel> messageChannels
           
protected  int nConnections
           
protected  ServerSocket sock
           
protected  int useCount
           
 
Fields inherited from class gov.nist.javax.sip.stack.MessageProcessor
IN_ADDR_ANY, IN6_ADDR_ANY, sipStack, transport
 
Constructor Summary
ConnectionOrientedMessageProcessor(InetAddress ipAddress, int port, String transport, SIPTransactionStack sipStack)
           
 
Method Summary
protected  void cacheMessageChannel(ConnectionOrientedMessageChannel messageChannel)
           
 boolean closeReliableConnection(String peerAddress, int peerPort)
           
 int getMaximumMessageSize()
          TCP can handle an unlimited number of bytes.
 SIPTransactionStack getSIPStack()
          Returns the stack.
 boolean inUse()
          Return true if there are pending messages to be processed (which prevents the message channel from being closed).
protected  void remove(ConnectionOrientedMessageChannel messageChannel)
           
 boolean setKeepAliveTimeout(String peerAddress, int peerPort, long keepAliveTimeout)
           
protected  void validatePortInRange(int port)
           
 
Methods inherited from class gov.nist.javax.sip.stack.MessageProcessor
createMessageChannel, createMessageChannel, getDefaultPort, getDefaultTargetPort, getIpAddress, getListeningPoint, getPort, getSavedIpAddress, getSentBy, getTransport, getViaHeader, initialize, isSecure, isSentBySet, run, setIpAddress, setListeningPoint, setSentBy, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nConnections

protected int nConnections

isRunning

protected boolean isRunning

messageChannels

protected Map<String,ConnectionOrientedMessageChannel> messageChannels

incomingMessageChannels

protected Map<String,ConnectionOrientedMessageChannel> incomingMessageChannels

sock

protected ServerSocket sock

useCount

protected int useCount
Constructor Detail

ConnectionOrientedMessageProcessor

public ConnectionOrientedMessageProcessor(InetAddress ipAddress,
                                          int port,
                                          String transport,
                                          SIPTransactionStack sipStack)
Method Detail

getSIPStack

public SIPTransactionStack getSIPStack()
Returns the stack.

Specified by:
getSIPStack in class MessageProcessor
Returns:
my sip stack.

remove

protected void remove(ConnectionOrientedMessageChannel messageChannel)

cacheMessageChannel

protected void cacheMessageChannel(ConnectionOrientedMessageChannel messageChannel)

getMaximumMessageSize

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

Specified by:
getMaximumMessageSize in class MessageProcessor

inUse

public boolean inUse()
Description copied from class: MessageProcessor
Return true if there are pending messages to be processed (which prevents the message channel from being closed).

Specified by:
inUse in class MessageProcessor

closeReliableConnection

public boolean closeReliableConnection(String peerAddress,
                                       int peerPort)
                                throws IllegalArgumentException
Throws:
IllegalArgumentException

setKeepAliveTimeout

public boolean setKeepAliveTimeout(String peerAddress,
                                   int peerPort,
                                   long keepAliveTimeout)

validatePortInRange

protected void validatePortInRange(int port)
                            throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2012. All Rights Reserved.