org.mobicents.mgcp.stack
Class JainMgcpStackImpl

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

public class JainMgcpStackImpl
extends java.lang.Thread
implements jain.protocol.ip.mgcp.JainMgcpStack

Author:
Oleg Kulikov, Pavel Mitrenko

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  int port
           
protected  JainMgcpStackProviderImpl provider
           
protected  java.util.concurrent.ConcurrentHashMap<java.lang.Integer,TransactionHandler> responseTx
           
protected  java.util.concurrent.ConcurrentHashMap<java.lang.Integer,TransactionHandler> transactions
          holds current active transactions (RFC 3435 [$3.2.1.2]: for tx sent & received).
 
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
 
Method Summary
 void close()
          Closes the stack and it's underlying resources.
 jain.protocol.ip.mgcp.JainMgcpProvider createProvider()
           
 void deleteProvider(jain.protocol.ip.mgcp.JainMgcpProvider provider)
           
 int getPort()
           
 java.lang.String getProtocolVersion()
           
 boolean isRequest(java.lang.String header)
           
 void run()
           
protected  void send(java.net.DatagramPacket packet)
           
 void setPort(int port)
           
 void setProtocolVersion(java.lang.String protocolVersion)
           
 
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
 

Field Detail

port

protected int port

provider

protected JainMgcpStackProviderImpl provider

transactions

protected java.util.concurrent.ConcurrentHashMap<java.lang.Integer,TransactionHandler> transactions
holds current active transactions (RFC 3435 [$3.2.1.2]: for tx sent & received).


responseTx

protected java.util.concurrent.ConcurrentHashMap<java.lang.Integer,TransactionHandler> responseTx
Constructor Detail

JainMgcpStackImpl

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

Method Detail

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

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


Copyright © 2008. All Rights Reserved.