org.mobicents.protocols.mgcp.stack
Class JainMgcpStackImpl

java.lang.Object
  extended by java.lang.Thread
      extended by org.mobicents.protocols.mgcp.stack.JainMgcpStackImpl
All Implemented Interfaces:
jain.protocol.ip.mgcp.JainMgcpStack, jain.protocol.ip.mgcp.OAM_IF, Runnable

public class JainMgcpStackImpl
extends Thread
implements jain.protocol.ip.mgcp.JainMgcpStack, jain.protocol.ip.mgcp.OAM_IF

Author:
Oleg Kulikov, Pavel Mitrenko, Yulian Oifa

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String _EXECUTOR_QUEUE_SIZE
          Defines how many message can be stored in queue before new ones are discarded.
static String _EXECUTOR_TABLE_SIZE
          Defines how many executors will work on event delivery
protected  int parserThreadPoolSize
           
protected  int port
           
 JainMgcpStackProviderImpl provider
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JainMgcpStackImpl()
           
JainMgcpStackImpl(InetAddress localAddress, int port)
          Creates a new instance of JainMgcpStackImpl
 
Method Summary
 PacketRepresentation allocatePacket()
           
 void close()
          Closes the stack and it's underlying resources.
 jain.protocol.ip.mgcp.JainMgcpProvider createProvider()
           
 void deleteProvider(jain.protocol.ip.mgcp.JainMgcpProvider provider)
           
 InetAddress getAddress()
           
 ConcurrentMap<TransactionHandler> getCompletedTransactions()
           
 ConcurrentMap<TransactionHandler> getLocalTransactions()
           
 int getPort()
           
 String getProtocolVersion()
           
 ConcurrentMap<Integer> getRemoteTxToLocalTxMap()
           
 boolean isRequest(String header)
           
 void printStats()
           
 void releasePacket(PacketRepresentation pr)
           
 void run()
           
 void send(PacketRepresentation pr)
           
 void setPort(int port)
           
 void setProtocolVersion(String protocolVersion)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_EXECUTOR_TABLE_SIZE

public static final String _EXECUTOR_TABLE_SIZE
Defines how many executors will work on event delivery

See Also:
Constant Field Values

_EXECUTOR_QUEUE_SIZE

public static final String _EXECUTOR_QUEUE_SIZE
Defines how many message can be stored in queue before new ones are discarded.

See Also:
Constant Field Values

port

protected int port

provider

public JainMgcpStackProviderImpl provider

parserThreadPoolSize

protected int parserThreadPoolSize
Constructor Detail

JainMgcpStackImpl

public JainMgcpStackImpl()

JainMgcpStackImpl

public JainMgcpStackImpl(InetAddress localAddress,
                         int port)
Creates a new instance of JainMgcpStackImpl

Method Detail

printStats

public void printStats()

close

public void close()
Closes the stack and it's underlying resources.


createProvider

public jain.protocol.ip.mgcp.JainMgcpProvider createProvider()
                                                      throws jain.protocol.ip.mgcp.CreateProviderException
Specified by:
createProvider in interface jain.protocol.ip.mgcp.JainMgcpStack
Throws:
jain.protocol.ip.mgcp.CreateProviderException

deleteProvider

public void deleteProvider(jain.protocol.ip.mgcp.JainMgcpProvider provider)
                    throws jain.protocol.ip.mgcp.DeleteProviderException
Specified by:
deleteProvider in interface jain.protocol.ip.mgcp.JainMgcpStack
Throws:
jain.protocol.ip.mgcp.DeleteProviderException

setPort

public void setPort(int port)
Specified by:
setPort in interface jain.protocol.ip.mgcp.OAM_IF

getPort

public int getPort()
Specified by:
getPort in interface jain.protocol.ip.mgcp.JainMgcpStack

getAddress

public InetAddress getAddress()

getProtocolVersion

public String getProtocolVersion()
Specified by:
getProtocolVersion in interface jain.protocol.ip.mgcp.JainMgcpStack

setProtocolVersion

public void setProtocolVersion(String protocolVersion)
Specified by:
setProtocolVersion in interface jain.protocol.ip.mgcp.JainMgcpStack

allocatePacket

public PacketRepresentation allocatePacket()

releasePacket

public void releasePacket(PacketRepresentation pr)

send

public void send(PacketRepresentation pr)

isRequest

public boolean isRequest(String header)

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getLocalTransactions

public ConcurrentMap<TransactionHandler> getLocalTransactions()

getRemoteTxToLocalTxMap

public ConcurrentMap<Integer> getRemoteTxToLocalTxMap()

getCompletedTransactions

public ConcurrentMap<TransactionHandler> getCompletedTransactions()


Copyright © 2013 TeleStax, Inc.. All Rights Reserved.