public abstract class AbstractMgcpConnection extends Object implements MgcpConnection
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.util.concurrent.ListeningScheduledExecutorService |
executor |
protected static int |
HALF_OPEN_TIMER |
protected int |
halfOpenTimeout |
protected Set<MgcpEventObserver> |
observers |
protected MgcpConnectionState |
state |
protected Object |
stateLock |
protected int |
timeout |
protected com.google.common.util.concurrent.ListenableFuture<Integer> |
timerFuture |
| Constructor and Description |
|---|
AbstractMgcpConnection(int identifier,
int callId,
int halfOpenTimeout,
int openTimeout,
MgcpEventProvider eventProvider,
com.google.common.util.concurrent.ListeningScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
expireIn(int timeout) |
void |
forget(MgcpEventObserver observer) |
abstract AudioComponent |
getAudioComponent()
Gets the in-band audio component of the connection.
|
int |
getCallIdentifier()
Gets the call identifier.
|
String |
getCallIdentifierHex()
Gets the call identifier.
|
String |
getHexIdentifier()
Gets the connection identifier.
|
int |
getIdentifier()
Gets the connection identifier.
|
ConnectionMode |
getMode()
Gets the current mode of the connection.
|
abstract OOBComponent |
getOutOfBandComponent()
Gets the out-of-band audio component of the connection.
|
MgcpConnectionState |
getState()
Gets the current state of the connection
|
protected abstract boolean |
isEventSupported(MgcpRequestedEvent event) |
protected abstract void |
listen(MgcpEvent event) |
void |
listen(MgcpRequestedEvent event)
Requests the connection to send notifications about a certain event.
|
protected abstract org.apache.log4j.Logger |
log() |
void |
notify(Object originator,
MgcpEvent event) |
void |
observe(MgcpEventObserver observer) |
void |
setMode(ConnectionMode mode)
Sets the mode of the connection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, halfOpen, isLocal, openprotected volatile MgcpConnectionState state
protected final Object stateLock
protected final Set<MgcpEventObserver> observers
protected final com.google.common.util.concurrent.ListeningScheduledExecutorService executor
protected static final int HALF_OPEN_TIMER
protected com.google.common.util.concurrent.ListenableFuture<Integer> timerFuture
protected final int timeout
protected final int halfOpenTimeout
public AbstractMgcpConnection(int identifier,
int callId,
int halfOpenTimeout,
int openTimeout,
MgcpEventProvider eventProvider,
com.google.common.util.concurrent.ListeningScheduledExecutorService executor)
public int getIdentifier()
MgcpConnectiongetIdentifier in interface MgcpConnectionpublic String getHexIdentifier()
MgcpConnectiongetHexIdentifier in interface MgcpConnectionpublic int getCallIdentifier()
MgcpConnectiongetCallIdentifier in interface MgcpConnectionpublic String getCallIdentifierHex()
MgcpConnectiongetCallIdentifierHex in interface MgcpConnectionpublic ConnectionMode getMode()
MgcpConnectiongetMode in interface MgcpConnectionpublic MgcpConnectionState getState()
MgcpConnectiongetState in interface MgcpConnectionpublic void setMode(ConnectionMode mode) throws IllegalStateException
MgcpConnectionsetMode in interface MgcpConnectionmode - The new mode of the connectionIllegalStateException - Cannot update mode of closed connectionspublic void listen(MgcpRequestedEvent event) throws UnsupportedMgcpEventException
MgcpConnectionlisten in interface MgcpConnectionevent - The event to liste to.UnsupportedMgcpEventException - If the connection does not support the event.protected abstract boolean isEventSupported(MgcpRequestedEvent event)
protected abstract void listen(MgcpEvent event) throws UnsupportedMgcpEventException
UnsupportedMgcpEventExceptionpublic abstract AudioComponent getAudioComponent()
MgcpConnectiongetAudioComponent in interface MgcpConnectionpublic abstract OOBComponent getOutOfBandComponent()
MgcpConnectiongetOutOfBandComponent in interface MgcpConnectionpublic void observe(MgcpEventObserver observer)
observe in interface MgcpEventSubjectpublic void forget(MgcpEventObserver observer)
forget in interface MgcpEventSubjectpublic void notify(Object originator, MgcpEvent event)
notify in interface MgcpEventSubjectprotected abstract org.apache.log4j.Logger log()
protected void expireIn(int timeout)
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.