MjSip Stack
v1.6

org.zoolu.sip.transaction
Class InviteTransactionServer

java.lang.Object
  |
  +--org.zoolu.sip.transaction.Transaction
        |
        +--org.zoolu.sip.transaction.TransactionServer
              |
              +--org.zoolu.sip.transaction.InviteTransactionServer
All Implemented Interfaces:
SipProviderListener, TimerListener

public class InviteTransactionServer
extends TransactionServer

INVITE server transaction as defined in RFC 3261 (Section 17.2.1).
An InviteTransactionServer is responsable to create a new SIP invite transaction that starts with a INVITE message received by the SipProvider and ends sending a final response.
The changes of the internal status and the received messages are fired to the TransactionListener passed to the InviteTransactionServer object.
This implementation of InviteTransactionServer automatically generates a "100 Trying" response when the INVITE message is received (as suggested by RFC3261)


Field Summary
static boolean AUTO_TRYING
          Default behavior for automatically sending 100 Trying on INVITE.
 
Fields inherited from class org.zoolu.sip.transaction.Transaction
transaction_counter
 
Constructor Summary
InviteTransactionServer(SipProvider sip_provider, InviteTransactionServerListener listener)
          Creates a new InviteTransactionServer.
InviteTransactionServer(SipProvider sip_provider, Message invite, boolean auto_trying, InviteTransactionServerListener listener)
          Creates a new InviteTransactionServer for the already received INVITE request invite.
InviteTransactionServer(SipProvider sip_provider, Message invite, InviteTransactionServerListener listener)
          Creates a new InviteTransactionServer for the already received INVITE request invite.
 
Method Summary
 void listen()
          Starts the InviteTransactionServer.
 void onReceivedMessage(SipProvider provider, Message msg)
          Method derived from interface SipListener.
 void onTimeout(Timer to)
          Method derived from interface TimerListener.
 void respondWith(Message resp)
          Sends a response message
 void setAutoTrying(boolean auto_trying)
          Whether automatically sending 100 Trying on INVITE.
 void terminate()
          Method used to drop an active transaction
 
Methods inherited from class org.zoolu.sip.transaction.TransactionServer
printLog
 
Methods inherited from class org.zoolu.sip.transaction.Transaction
getConnectionId, getRequestMessage, getSipProvider, getTransactionId, getTransactionMethod, printException, printWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTO_TRYING

public static boolean AUTO_TRYING
Default behavior for automatically sending 100 Trying on INVITE.
Constructor Detail

InviteTransactionServer

public InviteTransactionServer(SipProvider sip_provider,
                               InviteTransactionServerListener listener)
Creates a new InviteTransactionServer.

InviteTransactionServer

public InviteTransactionServer(SipProvider sip_provider,
                               Message invite,
                               InviteTransactionServerListener listener)
Creates a new InviteTransactionServer for the already received INVITE request invite.

InviteTransactionServer

public InviteTransactionServer(SipProvider sip_provider,
                               Message invite,
                               boolean auto_trying,
                               InviteTransactionServerListener listener)
Creates a new InviteTransactionServer for the already received INVITE request invite.
Method Detail

setAutoTrying

public void setAutoTrying(boolean auto_trying)
Whether automatically sending 100 Trying on INVITE.

listen

public void listen()
Starts the InviteTransactionServer.
Overrides:
listen in class TransactionServer

respondWith

public void respondWith(Message resp)
Sends a response message
Overrides:
respondWith in class TransactionServer

onReceivedMessage

public void onReceivedMessage(SipProvider provider,
                              Message msg)
Method derived from interface SipListener. It's fired from the SipProvider when a new message is catch for to the present ServerTransaction.
Overrides:
onReceivedMessage in class TransactionServer

onTimeout

public void onTimeout(Timer to)
Method derived from interface TimerListener. It's fired from an active Timer.
Overrides:
onTimeout in class TransactionServer

terminate

public void terminate()
Method used to drop an active transaction
Overrides:
terminate in class TransactionServer

MjSip Stack
v1.6