org.mobicents.mgcp.stack
Class EndpointHandler

java.lang.Object
  extended by org.mobicents.mgcp.stack.EndpointHandler

public class EndpointHandler
extends java.lang.Object

Start time:14:39:50 2008-11-21
Project: mobicents-media-server-controllers

Author:
baranowb - Bartosz Baranowski

Field Summary
protected  java.util.TreeSet<jain.protocol.ip.mgcp.message.parms.ConnectionIdentifier> connectionIds
           
protected  java.lang.String endpointId
           
protected  ThreadPoolQueueExecutor executor
          EndpointWide notification requests
protected  java.lang.String fakeId
           
protected static org.apache.log4j.Logger logger
           
protected  java.util.List<TransactionHandlerManagement> ongoingTransactions
           
protected  java.util.Set<jain.protocol.ip.mgcp.message.parms.RequestedEvent> requestedEvents
           
protected  EndpointHandlerManager stack
           
protected  boolean useFakeId
           
 
Constructor Summary
EndpointHandler(EndpointHandlerManager jainMgcpStackImpl, EndpointHandlerFactory factory)
           
 
Method Summary
 void addTransactionHandler(TransactionHandlerManagement handler)
          Method called once tx has been created
 void commandDelivered(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent, jain.protocol.ip.mgcp.JainMgcpResponseEvent event, TransactionHandlerManagement handler)
          Should be called when response command is delivered - either sent or received.
This method should take care of initializing another endpoint handler for cases like CRCX with wildcard and actual name of endpoint in response
 void commandDelivered(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent, TransactionHandlerManagement handler)
          Should be called when reqeust command is delivered - either sent or received.
 void doEndChecks()
          Should be called in case something changes - connection list change, subscription list change, tx termination/completition
 java.lang.String getFakeId()
           
 void init(java.lang.String endpointId)
           
static boolean isAllOfWildcard(java.lang.String endpointId)
           
static boolean isAnyOfWildcard(java.lang.String endpointId)
           
static boolean isWildCardEndpointName(java.lang.String endpointId)
           
protected  void processRequestedEvents(jain.protocol.ip.mgcp.message.parms.NotifiedEntity entity, jain.protocol.ip.mgcp.message.parms.RequestedEvent[] rEvents)
           
 void processRxTimeout(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent, TransactionHandlerManagement transactionHandler)
          Called when remotely created tx times out
 void processTxTimeout(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent, TransactionHandlerManagement transactionHandler)
          Called when localy initiated transaction times out
 void scheduleTransactionHandler(TransactionHandlerManagement th)
           
 void setUseFake(boolean b)
           
 java.lang.String toString()
           
 void transactionHandlerDeleted(TransactionHandlerManagement th)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

connectionIds

protected java.util.TreeSet<jain.protocol.ip.mgcp.message.parms.ConnectionIdentifier> connectionIds

executor

protected ThreadPoolQueueExecutor executor
EndpointWide notification requests


ongoingTransactions

protected java.util.List<TransactionHandlerManagement> ongoingTransactions

stack

protected EndpointHandlerManager stack

endpointId

protected java.lang.String endpointId

fakeId

protected java.lang.String fakeId

useFakeId

protected boolean useFakeId

requestedEvents

protected java.util.Set<jain.protocol.ip.mgcp.message.parms.RequestedEvent> requestedEvents
Constructor Detail

EndpointHandler

public EndpointHandler(EndpointHandlerManager jainMgcpStackImpl,
                       EndpointHandlerFactory factory)
Method Detail

init

public void init(java.lang.String endpointId)

getFakeId

public java.lang.String getFakeId()

addTransactionHandler

public void addTransactionHandler(TransactionHandlerManagement handler)
Method called once tx has been created

Parameters:
handler -

scheduleTransactionHandler

public void scheduleTransactionHandler(TransactionHandlerManagement th)

commandDelivered

public void commandDelivered(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent,
                             TransactionHandlerManagement handler)
Should be called when reqeust command is delivered - either sent or received.

Parameters:
commandEvent -
handler -

commandDelivered

public void commandDelivered(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent,
                             jain.protocol.ip.mgcp.JainMgcpResponseEvent event,
                             TransactionHandlerManagement handler)
Should be called when response command is delivered - either sent or received.
This method should take care of initializing another endpoint handler for cases like CRCX with wildcard and actual name of endpoint in response

Parameters:
commandEvent -
event -
handler -

processRequestedEvents

protected void processRequestedEvents(jain.protocol.ip.mgcp.message.parms.NotifiedEntity entity,
                                      jain.protocol.ip.mgcp.message.parms.RequestedEvent[] rEvents)

processTxTimeout

public void processTxTimeout(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent,
                             TransactionHandlerManagement transactionHandler)
Called when localy initiated transaction times out

Parameters:
commandEvent -
transactionHandler -

processRxTimeout

public void processRxTimeout(jain.protocol.ip.mgcp.JainMgcpCommandEvent commandEvent,
                             TransactionHandlerManagement transactionHandler)
Called when remotely created tx times out

Parameters:
commandEvent -
transactionHandler -

transactionHandlerDeleted

public void transactionHandlerDeleted(TransactionHandlerManagement th)

doEndChecks

public void doEndChecks()
Should be called in case something changes - connection list change, subscription list change, tx termination/completition


isWildCardEndpointName

public static boolean isWildCardEndpointName(java.lang.String endpointId)

isAnyOfWildcard

public static boolean isAnyOfWildcard(java.lang.String endpointId)

isAllOfWildcard

public static boolean isAllOfWildcard(java.lang.String endpointId)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setUseFake

public void setUseFake(boolean b)


Copyright © 2009. All Rights Reserved.