|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is an interface which supports generic protocol-neutral Management
transactions for user client applications.
It offers the ManagementServices like Request response,
Event notification and request Polling to the user client applications.
Applications should use the method ManagementServicesAPI.getInstance(String[] ,int ) or ManagementServicesAPI.getInstance(Applet,int) to create a ManagementServices implementation instance. This is a singleton instance for a JVM.
Click Here For Details
Transactions Supported For User Client Applications : This supports the following types of transactions with the user client applications.
a) Request Response (Synchronous ) : Sending a request and receiving the response synchronously.
b) Request Response (Asynchronous) : Sending a request and receiving the response asynchronously.
c) Polling Request : Registering a request to be sent periodically and receiving the responses.
d) Event Notifications : : Registering a request for receiving event notifications .
| Method Summary | |
boolean |
checkResponse(int reqid)
To check if response has been received for the given request id. |
int[] |
checkResponses()
To return request id of all the responses received. |
java.lang.String |
establishSession(Property prop)
Used to establish a session with the device agent. |
boolean |
isRunning()
Determines If the ManagementServices is running or stopped . |
ManagementServerResultEvent |
receive(int reqid)
Gets the result for send() as ManagementServerResultEvent for the given reqid returned for send(). |
void |
registerClient(Property property)
Registers a Property request with the ManagementServices for Polling. |
void |
registerClient(Property[] propertyArr)
Registers an array of Property requests with the ManagementServices for Polling. |
java.lang.String |
registerForNotification(Property prop)
Registers a Property request with the ManagementServices for receiving Event notifications. The user client application object should implement MSEventListener interface for
receiving notifications. |
void |
reRegisterClient(Property property)
Unregisters and registers a Property request with the ManagementServices for Polling. |
void |
reRegisterClient(Property[] propertyArr)
Unregisters and registers a Property request with the ManagementServices for Polling. |
void |
restart()
This will restart the ManagementServices if they have been stopped using stop(). |
int |
send(Property prop)
Asynchronous type of Request Response Transaction . |
void |
sendAction(Property prop)
A unacknowledged type of Request Response Transaction . |
void |
setDebug(boolean debug)
This is used to enable the debug mode in Management Services. |
void |
stop()
This will temporarily shutdown the ManagementServices. |
ManagementServerResultEvent |
syncSend(Property prop)
Synchronous type of Request Response Transaction . |
void |
terminateSession(Property prop)
Used to terminate an established device session . |
void |
terminateSession(java.lang.String sessionId)
This is used to terminate the session using the sessionId returned during establish. |
void |
unregisterClient(Property property)
Unregisters a Property request with the ManagementServices from Polling. |
void |
unregisterClient(Property[] propertyArr)
Unregisters an array of Property requests with the ManagementServices from Polling. |
void |
unregisterForNotification(Property prop)
Unregisters a Property request with the ManagementServices from receiving events. |
void |
unregisterForNotification(java.lang.String eventId)
Unregisters a Property request with the ManagementServices from receiving events. |
| Method Detail |
public void restart()
throws java.lang.Exception
stop(). It will restart the Polling and Event
notification operation.public void stop()
restart()
public void registerClient(Property property)
throws java.lang.Exception
ProtocolListener interface
or using
Property.setMethodDetail(String,
int, String[], Object[])
DetailsProperty - - Property to register.
public void registerClient(Property[] propertyArr)
throws java.lang.Exception
ProtocolListener interface
or using
Property.setMethodDetail(String, int, String[], Object[])
DetailsProperty[] - - Property array to register.public void unregisterClient(Property property)
Property - - Property to unregister.public void unregisterClient(Property[] propertyArr)
Property[] - - Property array to unregister.
public void reRegisterClient(Property property)
throws java.lang.Exception
Property - - Property request to reregister.
public void reRegisterClient(Property[] propertyArr)
throws java.lang.Exception
Property[] - - Property array to reregister.public ManagementServerResultEvent syncSend(Property prop)
public int send(Property prop)
It sends the request based on the Property and returns a requuestId
used to identify the transaction.
The user client application may get the responses either
through ProtocolListener interface
or using
Property.setMethodDetail(String, int, String[], Object[])
The requestId can be used to receive the response from the same thread context using
in receive(int) .
public boolean checkResponse(int reqid)
reqid - - integer representing the request id.public int[] checkResponses()
public ManagementServerResultEvent receive(int reqid)
reqid - - integer representing the request id.public void sendAction(Property prop)
It sends the request based on the Property and returns.
It is used to invoke an action in the Protocol Provider which may be
specific to the protocol.
public java.lang.String registerForNotification(Property prop)
MSEventListener interface for
receiving notifications.public void unregisterForNotification(Property prop)
Property - - Property request to unregister.
The Property should be the same instance as used for register.public void unregisterForNotification(java.lang.String eventId)
eventId - returned in register .public java.lang.String establishSession(Property prop)
DeviceConnectionListener if it needs
to be notified of connection loss. Property - - Property request for establishing a session.public void terminateSession(Property prop)
Property - - Property request for terminating a session.
The Property should be the same instance as used for establish.public void terminateSession(java.lang.String sessionId)
sessionId - - sessionId returned in establishSession.public boolean isRunning()
public void setDebug(boolean debug)
debug - - boolean representing the debug mode as true/false.
|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||