local.server
Class StatefulProxyState

java.lang.Object
  |
  +--local.server.StatefulProxyState

public class StatefulProxyState
extends java.lang.Object

Class StatefulProxyState allows the record and management of all TransactionServer-to-TransactionClient mappings in a stateful proxy


Constructor Summary
StatefulProxyState()
          Creates the StatefulProxyState
 
Method Summary
 void addClient(org.zoolu.sip.transaction.TransactionServer ts, org.zoolu.sip.transaction.Transaction tc)
          Appends a new client to server ts.
 void addServer(org.zoolu.sip.transaction.TransactionServer ts)
          Adds a new server ts
 void clearClients(org.zoolu.sip.transaction.TransactionServer ts)
          Removes all clients bound to server ts.
 java.util.HashSet getClients(org.zoolu.sip.transaction.TransactionServer ts)
          Gets all clients bound to server ts.
 org.zoolu.sip.message.Message getFinalResponse(org.zoolu.sip.transaction.TransactionServer ts)
          Gets the final response for server ts.
 org.zoolu.sip.transaction.TransactionServer getServer(org.zoolu.sip.transaction.Transaction tc)
          Gets the server bound to client tc
 boolean hasServer(org.zoolu.sip.transaction.TransactionServer ts)
          Whether there is a server ts.
 int numOfClients()
          Gets the number of active clients.
 int numOfServers()
          Gets the number of active servers.
 void removeClient(org.zoolu.sip.transaction.Transaction tc)
          Removes a client.
 void removeServer(org.zoolu.sip.transaction.TransactionServer ts)
          Removes server ts.
 void setFinalResponse(org.zoolu.sip.transaction.TransactionServer ts, org.zoolu.sip.message.Message resp)
          Sets the final response for server ts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulProxyState

public StatefulProxyState()
Creates the StatefulProxyState
Method Detail

addServer

public void addServer(org.zoolu.sip.transaction.TransactionServer ts)
Adds a new server ts

addClient

public void addClient(org.zoolu.sip.transaction.TransactionServer ts,
                      org.zoolu.sip.transaction.Transaction tc)
Appends a new client to server ts. If server ts is new, adds it.

removeClient

public void removeClient(org.zoolu.sip.transaction.Transaction tc)
Removes a client.

clearClients

public void clearClients(org.zoolu.sip.transaction.TransactionServer ts)
Removes all clients bound to server ts.

hasServer

public boolean hasServer(org.zoolu.sip.transaction.TransactionServer ts)
Whether there is a server ts.

removeServer

public void removeServer(org.zoolu.sip.transaction.TransactionServer ts)
Removes server ts.

getServer

public org.zoolu.sip.transaction.TransactionServer getServer(org.zoolu.sip.transaction.Transaction tc)
Gets the server bound to client tc

getClients

public java.util.HashSet getClients(org.zoolu.sip.transaction.TransactionServer ts)
Gets all clients bound to server ts.

setFinalResponse

public void setFinalResponse(org.zoolu.sip.transaction.TransactionServer ts,
                             org.zoolu.sip.message.Message resp)
Sets the final response for server ts.

getFinalResponse

public org.zoolu.sip.message.Message getFinalResponse(org.zoolu.sip.transaction.TransactionServer ts)
Gets the final response for server ts.

numOfServers

public int numOfServers()
Gets the number of active servers.

numOfClients

public int numOfClients()
Gets the number of active clients.