public class MgcpEndpointManager extends Object implements MgcpEndpointObserver, MgcpMessageObserver, MgcpMessageSubject
| Constructor and Description |
|---|
MgcpEndpointManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
forget(MgcpMessageObserver observer) |
MgcpEndpoint |
getEndpoint(String endpointId)
Gets a registered endpoint.
|
void |
installProvider(MgcpEndpointProvider<?> provider) |
void |
notify(Object originator,
MgcpMessage message,
MessageDirection direction) |
void |
observe(MgcpMessageObserver observer) |
void |
onEndpointStateChanged(MgcpEndpoint endpoint,
MgcpEndpointState state)
Fired when an endpoint state changes.
|
void |
onMessage(MgcpMessage message,
MessageDirection direction)
Event triggered when a message arrives.
|
MgcpEndpoint |
registerEndpoint(String namespace)
Registers a new endpoint.
|
boolean |
supportsNamespace(String namespace) |
void |
uninstallProvider(String namespace) |
void |
unregisterEndpoint(String endpointId)
Unregisters an active endpoint.
|
public void installProvider(MgcpEndpointProvider<?> provider) throws IllegalArgumentException
IllegalArgumentExceptionpublic void uninstallProvider(String namespace)
public boolean supportsNamespace(String namespace)
public MgcpEndpoint registerEndpoint(String namespace) throws UnrecognizedMgcpNamespaceException
endpoint - The name space of the endpoint which indicates what kind of endpoint is generated.UnrecognizedMgcpNamespaceExceptionpublic MgcpEndpoint getEndpoint(String endpointId)
endpointId - The endpoint identifier.public void unregisterEndpoint(String endpointId) throws MgcpEndpointNotFoundException
endpointId - The ID of the endpoint to be unregisteredMgcpEndpointNotFoundException - If there is no registered endpoint with such IDpublic void onMessage(MgcpMessage message, MessageDirection direction)
MgcpMessageObserveronMessage in interface MgcpMessageObservermessage - The messagedirection - The direction of the message: incoming or outgoing.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 onEndpointStateChanged(MgcpEndpoint endpoint, MgcpEndpointState state)
MgcpEndpointObserver
An endpoint becomes ACTIVE when it contains at least one connection. Its Mixer is active and consumes CPU.
An endpoint becomes INACTIVE when it contains no connections. Its Mixer is inactive and does not consume CPU.
onEndpointStateChanged in interface MgcpEndpointObserverendpoint - The endpoint whose state changed.state - The new state of the endpoint.Copyright © 2017 TeleStax, Inc.. All Rights Reserved.