org.mobicents.jcc.inap
Class JccCallImpl

java.lang.Object
  extended by org.mobicents.jcc.inap.JccCallImpl
All Implemented Interfaces:
javax.csapi.cc.jcc.JccCall

public class JccCallImpl
extends java.lang.Object
implements javax.csapi.cc.jcc.JccCall

Author:
Oleg Kulikov

Field Summary
static int CALL_ID_GENERATOR
           
protected  java.lang.String callID
           
protected  java.util.ArrayList callListeners
           
protected  java.util.ArrayList connectionListeners
           
protected  EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap connections
           
protected  int direction
           
protected  JccInapProviderImpl provider
           
protected  int state
           
 
Fields inherited from interface javax.csapi.cc.jcc.JccCall
ACTIVE, IDLE, INVALID
 
Constructor Summary
protected JccCallImpl(JccInapProviderImpl provider, javax.csapi.cc.jcc.JccAddress callingNumber)
           
 
Method Summary
 void addCallListener(javax.csapi.cc.jcc.JccCallListener listener)
          (Non-Javadoc).
 void addConnectionListener(javax.csapi.cc.jcc.JccConnectionListener cl, javax.csapi.cc.jcc.EventFilter filter)
          (Non-Javadoc).
protected  void append(javax.csapi.cc.jcc.JccConnection connection)
           
protected  void clear()
           
 javax.csapi.cc.jcc.JccConnection[] connect(javax.csapi.cc.jcc.JccAddress origaddr, java.lang.String dialedDigits)
          (Non-Javadoc).
 javax.csapi.cc.jcc.JccConnection createConnection(java.lang.String targetAddress, java.lang.String originatingAddress, java.lang.String originalCalledAddress, java.lang.String redirectingAddress)
          (Non-Javadoc).
protected  void fireCallEvent(javax.csapi.cc.jcc.JccCallEvent event)
           
protected  void fireCallEvent(java.util.Vector callListeners, javax.csapi.cc.jcc.JccCallEvent event)
           
protected  void forceRelease()
           
 javax.csapi.cc.jcc.JccConnection[] getConnections()
          (Non-Javadoc).
 javax.csapi.cc.jcc.JccProvider getProvider()
          (Non-Javadoc).
 int getState()
          (Non-Javadoc).
 void release(int causeCode)
          (Non-Javadoc).
protected  void remove(javax.csapi.cc.jcc.JccConnection connection)
           
 void removeCallListener(javax.csapi.cc.jcc.JccCallListener calllistener)
          (Non-Javadoc).
 void removeConnectionListener(javax.csapi.cc.jcc.JccConnectionListener cl)
          (Non-Javadoc).
 javax.csapi.cc.jcc.JccConnection routeCall(java.lang.String string, java.lang.String string0, java.lang.String string1, java.lang.String string2)
           
 void superviseCall(javax.csapi.cc.jcc.JccCallListener calllistener, double time, int treatment)
          (Non-Javadoc).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CALL_ID_GENERATOR

public static int CALL_ID_GENERATOR

callID

protected java.lang.String callID

direction

protected int direction

provider

protected JccInapProviderImpl provider

state

protected int state

connections

protected EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap connections

callListeners

protected java.util.ArrayList callListeners

connectionListeners

protected java.util.ArrayList connectionListeners
Constructor Detail

JccCallImpl

protected JccCallImpl(JccInapProviderImpl provider,
                      javax.csapi.cc.jcc.JccAddress callingNumber)
Method Detail

createConnection

public javax.csapi.cc.jcc.JccConnection createConnection(java.lang.String targetAddress,
                                                         java.lang.String originatingAddress,
                                                         java.lang.String originalCalledAddress,
                                                         java.lang.String redirectingAddress)
                                                  throws javax.csapi.cc.jcc.InvalidStateException,
                                                         javax.csapi.cc.jcc.ResourceUnavailableException,
                                                         javax.csapi.cc.jcc.PrivilegeViolationException,
                                                         javax.csapi.cc.jcc.MethodNotSupportedException,
                                                         javax.csapi.cc.jcc.InvalidArgumentException,
                                                         javax.csapi.cc.jcc.InvalidPartyException
(Non-Javadoc).

Specified by:
createConnection in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.InvalidStateException
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.PrivilegeViolationException
javax.csapi.cc.jcc.MethodNotSupportedException
javax.csapi.cc.jcc.InvalidArgumentException
javax.csapi.cc.jcc.InvalidPartyException
See Also:
JccCall.createConnection(String, String, String, String).

fireCallEvent

protected void fireCallEvent(java.util.Vector callListeners,
                             javax.csapi.cc.jcc.JccCallEvent event)

fireCallEvent

protected void fireCallEvent(javax.csapi.cc.jcc.JccCallEvent event)

addCallListener

public void addCallListener(javax.csapi.cc.jcc.JccCallListener listener)
                     throws javax.csapi.cc.jcc.ResourceUnavailableException,
                            javax.csapi.cc.jcc.MethodNotSupportedException
(Non-Javadoc).

Specified by:
addCallListener in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.MethodNotSupportedException
See Also:
JccCall.addCallListener(JccCallListener).

addConnectionListener

public void addConnectionListener(javax.csapi.cc.jcc.JccConnectionListener cl,
                                  javax.csapi.cc.jcc.EventFilter filter)
                           throws javax.csapi.cc.jcc.ResourceUnavailableException,
                                  javax.csapi.cc.jcc.MethodNotSupportedException
(Non-Javadoc).

Specified by:
addConnectionListener in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.MethodNotSupportedException
See Also:
JccCall.addConnectionListener(JccConnectionListener, EventFilter).

connect

public javax.csapi.cc.jcc.JccConnection[] connect(javax.csapi.cc.jcc.JccAddress origaddr,
                                                  java.lang.String dialedDigits)
                                           throws javax.csapi.cc.jcc.ResourceUnavailableException,
                                                  javax.csapi.cc.jcc.PrivilegeViolationException,
                                                  javax.csapi.cc.jcc.InvalidPartyException,
                                                  javax.csapi.cc.jcc.InvalidStateException,
                                                  javax.csapi.cc.jcc.MethodNotSupportedException
(Non-Javadoc).

Specified by:
connect in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.PrivilegeViolationException
javax.csapi.cc.jcc.InvalidPartyException
javax.csapi.cc.jcc.InvalidStateException
javax.csapi.cc.jcc.MethodNotSupportedException
See Also:
JccCall.connect(JccAddress, String).

getConnections

public javax.csapi.cc.jcc.JccConnection[] getConnections()
(Non-Javadoc).

Specified by:
getConnections in interface javax.csapi.cc.jcc.JccCall
See Also:
JccCall.getConnections().

getProvider

public javax.csapi.cc.jcc.JccProvider getProvider()
(Non-Javadoc).

Specified by:
getProvider in interface javax.csapi.cc.jcc.JccCall
See Also:
JccCall.getProvider().

getState

public int getState()
(Non-Javadoc).

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

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-Javadoc).

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

removeCallListener

public void removeCallListener(javax.csapi.cc.jcc.JccCallListener calllistener)
(Non-Javadoc).

Specified by:
removeCallListener in interface javax.csapi.cc.jcc.JccCall
See Also:
JccCall.removeCallListener(JccCallListener).

removeConnectionListener

public void removeConnectionListener(javax.csapi.cc.jcc.JccConnectionListener cl)
(Non-Javadoc).

Specified by:
removeConnectionListener in interface javax.csapi.cc.jcc.JccCall
See Also:
JccCall.removeConnectionListener(JccConnectionListener).

superviseCall

public void superviseCall(javax.csapi.cc.jcc.JccCallListener calllistener,
                          double time,
                          int treatment)
                   throws javax.csapi.cc.jcc.MethodNotSupportedException
(Non-Javadoc).

Specified by:
superviseCall in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.MethodNotSupportedException
See Also:
javax.csapi.cc.jcc.JccCall#superviceCall(JccCallListener, double, int).

forceRelease

protected void forceRelease()

append

protected void append(javax.csapi.cc.jcc.JccConnection connection)

remove

protected void remove(javax.csapi.cc.jcc.JccConnection connection)

clear

protected void clear()

routeCall

public javax.csapi.cc.jcc.JccConnection routeCall(java.lang.String string,
                                                  java.lang.String string0,
                                                  java.lang.String string1,
                                                  java.lang.String string2)
                                           throws javax.csapi.cc.jcc.InvalidStateException,
                                                  javax.csapi.cc.jcc.ResourceUnavailableException,
                                                  javax.csapi.cc.jcc.PrivilegeViolationException,
                                                  javax.csapi.cc.jcc.MethodNotSupportedException,
                                                  javax.csapi.cc.jcc.InvalidPartyException,
                                                  javax.csapi.cc.jcc.InvalidArgumentException
Specified by:
routeCall in interface javax.csapi.cc.jcc.JccCall
Throws:
javax.csapi.cc.jcc.InvalidStateException
javax.csapi.cc.jcc.ResourceUnavailableException
javax.csapi.cc.jcc.PrivilegeViolationException
javax.csapi.cc.jcc.MethodNotSupportedException
javax.csapi.cc.jcc.InvalidPartyException
javax.csapi.cc.jcc.InvalidArgumentException

toString

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


Copyright © 2010. All Rights Reserved.