org.mobicents.mgcp.stack
Class JainMgcpStackImpl
java.lang.Object
java.lang.Thread
org.mobicents.mgcp.stack.JainMgcpStackImpl
- All Implemented Interfaces:
- jain.protocol.ip.mgcp.JainMgcpStack, java.lang.Runnable, EndpointHandlerManager
public class JainMgcpStackImpl
- extends java.lang.Thread
- implements jain.protocol.ip.mgcp.JainMgcpStack, EndpointHandlerManager
- Author:
- Oleg Kulikov, Pavel Mitrenko
| Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
|
Constructor Summary |
JainMgcpStackImpl(java.net.InetAddress localAddress,
int port)
Creates a new instance of JainMgcpStackImpl |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
port
protected int port
provider
public JainMgcpStackProviderImpl provider
rawQueue
protected java.util.LinkedList<PacketRepresentation> rawQueue
eventSchedulerExecutor
protected ThreadPoolQueueExecutor eventSchedulerExecutor
messageHandler
protected MessageHandler messageHandler
JainMgcpStackImpl
public JainMgcpStackImpl(java.net.InetAddress localAddress,
int port)
- Creates a new instance of JainMgcpStackImpl
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)
getPort
public int getPort()
- Specified by:
getPort in interface jain.protocol.ip.mgcp.JainMgcpStack
getAddress
public java.net.InetAddress getAddress()
getProtocolVersion
public java.lang.String getProtocolVersion()
- Specified by:
getProtocolVersion in interface jain.protocol.ip.mgcp.JainMgcpStack
setProtocolVersion
public void setProtocolVersion(java.lang.String protocolVersion)
- Specified by:
setProtocolVersion in interface jain.protocol.ip.mgcp.JainMgcpStack
send
protected void send(java.net.DatagramPacket packet)
isRequest
public boolean isRequest(java.lang.String header)
run
public void run()
- Specified by:
run in interface java.lang.Runnable- Overrides:
run in class java.lang.Thread
getEndpointHandler
public EndpointHandler getEndpointHandler(java.lang.String endpointId,
boolean useFakeOnWildcard)
- Specified by:
getEndpointHandler in interface EndpointHandlerManager
removeEndpointHandler
public void removeEndpointHandler(java.lang.String endpointId)
- Specified by:
removeEndpointHandler in interface EndpointHandlerManager
switchMapping
public EndpointHandler switchMapping(java.lang.String fakeId,
java.lang.String specificEndpointId)
- Description copied from interface:
EndpointHandlerManager
- This fnction switches mapping from fakeId to specificEndpointId. If
endpoint handler bound to specific endpoint id exists it is returned
without any modification otherwise return value is zero and endpoint
handler mapping has been switched.
- Specified by:
switchMapping in interface EndpointHandlerManager
- Returns:
getNextExecutor
public ThreadPoolQueueExecutor getNextExecutor()
- Specified by:
getNextExecutor in interface EndpointHandlerManager
getLocalTransactions
public java.util.Map<java.lang.Integer,TransactionHandler> getLocalTransactions()
getRemoteTxToLocalTxMap
public java.util.Map<java.lang.Integer,java.lang.Integer> getRemoteTxToLocalTxMap()
getCompletedTransactions
public java.util.Map<java.lang.Integer,TransactionHandler> getCompletedTransactions()
Copyright © 2009. All Rights Reserved.