org.mobicents.jcc.inap
Class AbstractConnection

java.lang.Object
  extended by org.mobicents.jcc.inap.AbstractConnection
All Implemented Interfaces:
javax.csapi.cc.jcc.JccConnection
Direct Known Subclasses:
OriginatingConnection, TerminatingConnection

public abstract class AbstractConnection
extends java.lang.Object
implements javax.csapi.cc.jcc.JccConnection

Author:
Oleg Kulikov

Field Summary
protected  javax.csapi.cc.jcc.JccAddress address
           
static int ADDRESS_ANALYZE_TIMEOUT
           
static int ALERTING_TIMEOUT
           
static int AUTH_TIMEOUT
           
protected  JccCallImpl call
           
static int CALL_DELIVERY_TIMEOUT
           
protected  int cause
           
static int CONNECTED_TIMEOUT
           
protected  ConnectionID connectionID
           
static int IDLE_TIMEOUT
           
protected  boolean isBlocked
           
protected  EDU.oswego.cs.dl.util.concurrent.Semaphore semaphore
           
protected  int state
           
protected  org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog tcapDialog
           
protected  org.mobicents.protocols.ss7.tcap.api.TCAPProvider tcapProvider
           
protected  LocalTimer timer
           
 
Fields inherited from interface javax.csapi.cc.jcc.JccConnection
ADDRESS_ANALYZE, ADDRESS_COLLECT, ALERTING, AUTHORIZE_CALL_ATTEMPT, CALL_DELIVERY, CONNECTED, DISCONNECTED, FAILED, IDLE
 
Constructor Summary
AbstractConnection(ConnectionID connectionID, JccCallImpl call, javax.csapi.cc.jcc.JccAddress address, org.mobicents.protocols.ss7.tcap.api.TCAPProvider provider, org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog tcapDialog)
          Creates a new instance of AbstractConnection
 
Method Summary
protected  void block()
           
protected  void close()
           
 void continueProcessing()
          (Non Java-doc).
protected  void fireConnectionEvent(javax.csapi.cc.jcc.JccConnectionEvent event)
           
protected  void forceDisconnect()
           
 javax.csapi.cc.jcc.JccAddress getAddress()
          (Non Java-doc).
 javax.csapi.cc.jcc.JccCall getCall()
          (Non Java-doc).
static java.lang.String getCauseName(int cause)
           
 ConnectionID getID()
           
 int getState()
          (Non Java-doc).
static java.lang.String getStateName(int state)
           
 boolean isBlocked()
          (Non Java-doc).
protected  void notifyDisconnectImmediately(java.util.ArrayList listeners, javax.csapi.cc.jcc.JccConnectionEvent event)
           
abstract  void onAddressAnalyze(JccConnectionEventImpl evt)
           
abstract  void onAddressCollect()
           
abstract  void onAlerting()
           
abstract  void onAuthorizeCallAttempt()
           
abstract  void onCallDelivery()
           
abstract  void onConnected()
           
 void onConnectionCreated()
          Handle InitialDP detection point.
 void onDisconnected()
           
 void onFailed()
          Handle tc_abort event
 void queueEvent(javax.csapi.cc.jcc.JccEvent event)
           
 void release(int causeCode)
          (Non Java-doc).
protected  void resume()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.csapi.cc.jcc.JccConnection
answer, attachMedia, detachMedia, getDestinationAddress, getLastAddress, getMidCallData, getOriginalAddress, getOriginatingAddress, getRedirectedAddress, routeConnection, selectRoute
 

Field Detail

IDLE_TIMEOUT

public static final int IDLE_TIMEOUT
See Also:
Constant Field Values

AUTH_TIMEOUT

public static final int AUTH_TIMEOUT
See Also:
Constant Field Values

ADDRESS_ANALYZE_TIMEOUT

public static final int ADDRESS_ANALYZE_TIMEOUT
See Also:
Constant Field Values

CALL_DELIVERY_TIMEOUT

public static final int CALL_DELIVERY_TIMEOUT
See Also:
Constant Field Values

ALERTING_TIMEOUT

public static final int ALERTING_TIMEOUT
See Also:
Constant Field Values

CONNECTED_TIMEOUT

public static final int CONNECTED_TIMEOUT
See Also:
Constant Field Values

connectionID

protected ConnectionID connectionID

isBlocked

protected volatile boolean isBlocked

address

protected javax.csapi.cc.jcc.JccAddress address

call

protected JccCallImpl call

state

protected volatile int state

cause

protected volatile int cause

timer

protected LocalTimer timer

semaphore

protected EDU.oswego.cs.dl.util.concurrent.Semaphore semaphore

tcapProvider

protected org.mobicents.protocols.ss7.tcap.api.TCAPProvider tcapProvider

tcapDialog

protected org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog tcapDialog
Constructor Detail

AbstractConnection

public AbstractConnection(ConnectionID connectionID,
                          JccCallImpl call,
                          javax.csapi.cc.jcc.JccAddress address,
                          org.mobicents.protocols.ss7.tcap.api.TCAPProvider provider,
                          org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog tcapDialog)
Creates a new instance of AbstractConnection

Method Detail

getID

public ConnectionID getID()

getAddress

public javax.csapi.cc.jcc.JccAddress getAddress()
(Non Java-doc).

Specified by:
getAddress in interface javax.csapi.cc.jcc.JccConnection
See Also:
JccConnection.getAddress().

getCall

public javax.csapi.cc.jcc.JccCall getCall()
(Non Java-doc).

Specified by:
getCall in interface javax.csapi.cc.jcc.JccConnection
See Also:
JccConnection.getCall().

getState

public int getState()
(Non Java-doc).

Specified by:
getState in interface javax.csapi.cc.jcc.JccConnection
See Also:
JccConnection.getState().

isBlocked

public boolean isBlocked()
(Non Java-doc).

Specified by:
isBlocked in interface javax.csapi.cc.jcc.JccConnection
See Also:
JccConnection.isBlocked().

release

public void release(int causeCode)
             throws javax.csapi.cc.jcc.PrivilegeViolationException,
                    javax.csapi.cc.jcc.ResourceUnavailableException,
                    javax.csapi.cc.jcc.InvalidStateException,
                    javax.csapi.cc.jcc.InvalidArgumentException
(Non Java-doc).

Specified by:
release in interface javax.csapi.cc.jcc.JccConnection
Throws:
javax.csapi.cc.jcc.PrivilegeViolationException
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.InvalidStateException
javax.csapi.cc.jcc.InvalidArgumentException
See Also:
javax.csapi.cc.jcc.JccConnection#release().

continueProcessing

public void continueProcessing()
                        throws javax.csapi.cc.jcc.PrivilegeViolationException,
                               javax.csapi.cc.jcc.ResourceUnavailableException,
                               javax.csapi.cc.jcc.InvalidStateException
(Non Java-doc).

Specified by:
continueProcessing in interface javax.csapi.cc.jcc.JccConnection
Throws:
javax.csapi.cc.jcc.PrivilegeViolationException
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.InvalidStateException
See Also:
JccConnection.continueProcessing().

queueEvent

public void queueEvent(javax.csapi.cc.jcc.JccEvent event)

block

protected void block()

resume

protected void resume()

onConnectionCreated

public void onConnectionCreated()
Handle InitialDP detection point.


onAuthorizeCallAttempt

public abstract void onAuthorizeCallAttempt()

onAddressCollect

public abstract void onAddressCollect()

onAddressAnalyze

public abstract void onAddressAnalyze(JccConnectionEventImpl evt)

onCallDelivery

public abstract void onCallDelivery()

onAlerting

public abstract void onAlerting()

onConnected

public abstract void onConnected()

onFailed

public void onFailed()
Handle tc_abort event


onDisconnected

public void onDisconnected()

notifyDisconnectImmediately

protected void notifyDisconnectImmediately(java.util.ArrayList listeners,
                                           javax.csapi.cc.jcc.JccConnectionEvent event)

forceDisconnect

protected void forceDisconnect()

close

protected void close()

fireConnectionEvent

protected void fireConnectionEvent(javax.csapi.cc.jcc.JccConnectionEvent event)

getStateName

public static java.lang.String getStateName(int state)

getCauseName

public static java.lang.String getCauseName(int cause)

toString

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


Copyright © 2010. All Rights Reserved.