public class CstaMonitor
extends java.lang.Object
A CstaMonitor object is instantiated when the Application makes use of CstaProvider to start monitoring a CstaDevice. Once a CstaDevice is monitored, the CSTA Server will inform the SDK on any status change of this Device by sending CSTA Events.
The SDK stores and update the status of Connections from time to time upon receiving CSTA Event. The Application shall always retrieve the update to date status of the Device from this Monitor. There is no need for the Application to maintain its own connection list. The application can get one specified CstaConnection by giving the CallID, or get all the CstaConnections in a list/array.
CSTA SDK restricts only one Monitor is allowed per Device. So the CstaDevice and CstaMonitor has one to one mapping.
Modifier and Type | Field and Description |
---|---|
java.lang.String |
crossRefId
The monitored Cross Reference Id.
|
java.util.HashMap<java.lang.String,CstaConnection> |
cstaConnections
The list of CstaConnections that associated with this CstaDevice.
|
CstaFilterEventList |
filterEventList |
java.lang.String |
fqnDn
The deviceID in in FQN format.
|
static org.apache.log4j.Logger |
logger
The logger of log4j.
|
Constructor and Description |
---|
CstaMonitor()
CstaMonitor Constructor.
|
CstaMonitor(java.lang.String fqnDn)
CstaMonitor Constructor.
|
Modifier and Type | Method and Description |
---|---|
CstaConnection[] |
getConnectionArray()
Get an Array of Connections for this Monitor.
|
CstaConnection |
getConnectionByCallID(java.lang.String callID)
Get the specific Connection by CallID.
|
java.util.Collection<CstaConnection> |
getConnectionCollection()
Get a Collection of Connections for this Monitor.
|
boolean |
updateConnection(CstaConnection conn)
Update the Connection.
|
boolean |
updateConnection(CstaConnection conn,
boolean doNotRemove)
Update the Connection with more options.
|
public java.lang.String fqnDn
public java.lang.String crossRefId
public java.util.HashMap<java.lang.String,CstaConnection> cstaConnections
public static org.apache.log4j.Logger logger
public CstaFilterEventList filterEventList
public CstaMonitor()
A CstaMonitor Object is always instantiated internally by CSTA SDK when the Application makes use of CstaProvider to start monitoring a CstaDevice. A valid CstaMonitor is returned when the MonitorStartResponse is received with a valid crossRefID. The Application shall never try to instantiate a new CstaMonitor object. The Application is able to retrieve the CstaMonitor from CstaProvider by giving the Device's FQN.
public CstaMonitor(java.lang.String fqnDn)
A CstaMonitor Object is always instantiated internally by CSTA SDK when the Application makes use of CstaProvider to start monitoring a CstaDevice. A valid CstaMonitor is returned when the MonitorStartResponse is received with a valid crossRefID. The Application shall never try to instantiate a new CstaMonitor object. The Application is able to retrieve the CstaMonitor from CstaProvider by giving the Device's FQN.
fqnDn
- the device's FQN.public boolean updateConnection(CstaConnection conn)
conn
- the new Connection.public boolean updateConnection(CstaConnection conn, boolean doNotRemove)
conn
- the new Connection.doNotRemove
- if doNotRemove is set to true, even if conn.localState==null, do not remove the connection from list.public java.util.Collection<CstaConnection> getConnectionCollection()
public CstaConnection[] getConnectionArray()
public CstaConnection getConnectionByCallID(java.lang.String callID)
callID
- the CallID.