org.siprop.v2.stack.sip.impl
Class StackManagerImpl

java.lang.Object
  extended by org.siprop.v2.core.AbstractManager
      extended by org.siprop.v2.stack.sip.impl.StackManagerImpl
All Implemented Interfaces:
Listener, Manager, StackManager

public class StackManagerImpl
extends AbstractManager
implements StackManager

This class manages TUs. This class has entry point of SIP stack.

Author:
masaxmasa

Constructor Summary
StackManagerImpl()
          Constructor.
 
Method Summary
 void addTU(TransactionUser tu)
          Register a TransactionUser to own list.
 Context createResponse(Context responseContext, int statusCode)
          create SIP response message from SIP request message
 void doProcess(java.lang.String processName, java.lang.Object[] param)
          Execute process.
 java.lang.String getServiceName()
          get service name.
 java.util.List<TransactionUser> getTransactionUserList()
          get list of TransactionUser.
 void onReceive(Context context)
          It is a call-back point method called from a router.
 void registerTransactionUser(java.lang.String transactionKey, TransactionUser tu)
          add new map entry for specified Call-ID
 void send(Context context)
          It sends to a router.
 void setServiceName(java.lang.String serviceName)
          set service name.
 void start()
          Manager start.
 void stop()
          Manager stop.
 void unregisterTransactionUser(java.lang.String transactionKey)
          delete map entry for specified transactionKey
 
Methods inherited from class org.siprop.v2.core.AbstractManager
getBindingResolver, getRegisterResolver, getRouter, getUniKeyGenerator, setBindingResolver, setRegisterResolver, setRouter, setUniKeyGenerator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.siprop.v2.core.Manager
getBindingResolver, getRegisterResolver, getRouter, getUniKeyGenerator, setBindingResolver, setRegisterResolver, setRouter, setUniKeyGenerator
 

Constructor Detail

StackManagerImpl

public StackManagerImpl()
Constructor.

Method Detail

addTU

public void addTU(TransactionUser tu)
Register a TransactionUser to own list.

Specified by:
addTU in interface StackManager
Parameters:
tu -

onReceive

public void onReceive(Context context)
Description copied from interface: Listener
It is a call-back point method called from a router.

Specified by:
onReceive in interface Listener

send

public void send(Context context)
Description copied from interface: Manager
It sends to a router.

Specified by:
send in interface Manager
Overrides:
send in class AbstractManager

registerTransactionUser

public void registerTransactionUser(java.lang.String transactionKey,
                                    TransactionUser tu)
Description copied from interface: StackManager
add new map entry for specified Call-ID

Specified by:
registerTransactionUser in interface StackManager
Parameters:
transactionKey - transactionKey
tu - TU

unregisterTransactionUser

public void unregisterTransactionUser(java.lang.String transactionKey)
Description copied from interface: StackManager
delete map entry for specified transactionKey

Specified by:
unregisterTransactionUser in interface StackManager

doProcess

public void doProcess(java.lang.String processName,
                      java.lang.Object[] param)
Description copied from interface: Manager
Execute process.

Specified by:
doProcess in interface Manager
Parameters:
processName - name of a process to perform
param - process's parameter

createResponse

public Context createResponse(Context responseContext,
                              int statusCode)
                       throws SIPropException
Description copied from interface: StackManager
create SIP response message from SIP request message

Specified by:
createResponse in interface StackManager
Parameters:
responseContext - SIP request message
statusCode - status code of SIP response message
Returns:
SIP response message
Throws:
SIPropException

getTransactionUserList

public java.util.List<TransactionUser> getTransactionUserList()
Description copied from interface: StackManager
get list of TransactionUser.

Specified by:
getTransactionUserList in interface StackManager
Returns:
list of TransactionUser

getServiceName

public java.lang.String getServiceName()
Description copied from interface: Manager
get service name.

Specified by:
getServiceName in interface Manager
Returns:
service name.

setServiceName

public void setServiceName(java.lang.String serviceName)
Description copied from interface: Manager
set service name.

Specified by:
setServiceName in interface Manager
Parameters:
serviceName - service name.

start

public void start()
Description copied from interface: Manager
Manager start.

Specified by:
start in interface Manager

stop

public void stop()
Description copied from interface: Manager
Manager stop.

Specified by:
stop in interface Manager