public class GenericMgcpEndpoint extends Object implements MgcpEndpoint, MgcpCallListener, MgcpConnectionListener
| Modifier and Type | Field and Description |
|---|---|
protected MediaGroup |
mediaGroup |
| Constructor and Description |
|---|
GenericMgcpEndpoint(EndpointIdentifier endpointId,
MgcpConnectionProvider connectionProvider,
MediaGroup mediaGroup) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelSignal(String signal)
Attempts to cancel an active signal in the endpoint.
|
MgcpConnection |
createConnection(int callId,
boolean local)
Registers a connection.
|
protected void |
deactivate() |
MgcpConnection |
deleteConnection(int callId,
int connectionId)
Deletes an active connection.
|
List<MgcpConnection> |
deleteConnections()
Deletes all currently active connections.
|
List<MgcpConnection> |
deleteConnections(int callId)
Deletes all currently active connections within a specific call.
|
void |
forget(MgcpEndpointObserver observer) |
void |
forget(MgcpMessageObserver observer) |
MgcpConnection |
getConnection(int callId,
int connectionId)
Gets a connection by identifier.
|
EndpointIdentifier |
getEndpointId()
Gets the endpoint identifier
|
MediaGroup |
getMediaGroup()
Gets the media group that holds media components of the endpoint.
|
boolean |
hasCalls() |
boolean |
isActive() |
void |
notify(MgcpEndpoint endpoint,
MgcpEndpointState state) |
void |
notify(Object originator,
MgcpMessage message,
MessageDirection direction) |
void |
observe(MgcpEndpointObserver observer) |
void |
observe(MgcpMessageObserver observer) |
protected void |
onActivated()
Event that is called when endpoint becomes active.
|
void |
onCallTerminated(MgcpCall call) |
protected void |
onConnectionCreated(MgcpConnection connection)
Event that is called when a new connection is created in the endpoint.
|
protected void |
onConnectionDeleted(MgcpConnection connection)
Event that is called when a new connection is deleted in the endpoint.
|
void |
onConnectionFailure(MgcpConnection connection) |
protected void |
onDeactivated()
Event that is called when endpoint becomes inactive.
|
void |
onEvent(Object originator,
MgcpEvent event)
Triggered when an MGCP event is fired.
|
void |
requestNotification(NotificationRequest request)
Requests a notification to be fired when an event happens in the endpoint.
|
protected final MediaGroup mediaGroup
public GenericMgcpEndpoint(EndpointIdentifier endpointId, MgcpConnectionProvider connectionProvider, MediaGroup mediaGroup)
public EndpointIdentifier getEndpointId()
MgcpEndpointgetEndpointId in interface MgcpEndpointpublic MediaGroup getMediaGroup()
MgcpEndpointgetMediaGroup in interface MgcpEndpointpublic boolean hasCalls()
public MgcpConnection getConnection(int callId, int connectionId)
MgcpEndpointgetConnection in interface MgcpEndpointcallId - The call identifier.connectionId - The connection identifier.public MgcpConnection createConnection(int callId, boolean local)
MgcpEndpointcreateConnection in interface MgcpEndpointcallId - The identifier of the call where the connection belongs to.local - Whether a local or remote connection is to be created.public MgcpConnection deleteConnection(int callId, int connectionId) throws MgcpCallNotFoundException, MgcpConnectionNotFound
MgcpEndpointdeleteConnection in interface MgcpEndpointcallId - The ID of the call where the connection is stored.connectionId - The connection IDMgcpCallNotFoundException - When call with such ID cannot be found.MgcpConnectionNotFound - When call does not contain connection with such ID.public List<MgcpConnection> deleteConnections(int callId) throws MgcpCallNotFoundException
MgcpEndpointdeleteConnections in interface MgcpEndpointcallId - the call identifierMgcpCallNotFoundException - When call with such ID cannot be found.public List<MgcpConnection> deleteConnections()
MgcpEndpointdeleteConnections in interface MgcpEndpointpublic void onCallTerminated(MgcpCall call)
onCallTerminated in interface MgcpCallListenerpublic boolean isActive()
protected void deactivate()
throws IllegalStateException
IllegalStateExceptionpublic void onConnectionFailure(MgcpConnection connection)
onConnectionFailure in interface MgcpConnectionListenerpublic void requestNotification(NotificationRequest request)
MgcpEndpointrequestNotification in interface MgcpEndpointrequest - The notification request.public void cancelSignal(String signal)
MgcpEndpointcancelSignal in interface MgcpEndpointsignal - The name of the signal.protected void onConnectionCreated(MgcpConnection connection)
connection - protected void onConnectionDeleted(MgcpConnection connection)
connection - protected void onActivated()
connection - protected void onDeactivated()
connection - public void observe(MgcpMessageObserver observer)
observe in interface MgcpMessageSubjectpublic void forget(MgcpMessageObserver observer)
forget in interface MgcpMessageSubjectpublic void notify(Object originator, MgcpMessage message, MessageDirection direction)
notify in interface MgcpMessageSubjectpublic void onEvent(Object originator, MgcpEvent event)
MgcpEventObserveronEvent in interface MgcpEventObserveroriginator - The source of the event.event - The event data.public void observe(MgcpEndpointObserver observer)
observe in interface MgcpEndpointSubjectpublic void forget(MgcpEndpointObserver observer)
forget in interface MgcpEndpointSubjectpublic void notify(MgcpEndpoint endpoint, MgcpEndpointState state)
notify in interface MgcpEndpointSubjectCopyright © 2017 TeleStax, Inc.. All Rights Reserved.