|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is the interface which must be implemented by the ProtocolProvider(s) for plugging a particular protocol into the ManagementServer . The Protocol Provider implementation is basically a wrapper around the Protocol API's which can communicate with the respective device agents.
| Field Summary | |
static int |
ASYNC_COMM
This is the constant used to specify asynchronous communication mode between ProtocolProvider and Device agent . |
static int |
SYNC_COMM
This is the constant used to specify synchronous communication mode between ProtocolProvider and Device agent . |
| Method Summary | |
void |
addMSCallbackListener(MSCallbackListener msCBlistener)
This method is used by the ManagemntServer implementing MSCallbackListener to
register for being notified each time the ProtocolProvider gets
a response. |
void |
addMSConnectionListener(MSConnectionListener msConListener)
This method is used by the ManagemntServer implementing MSConnectionListener to
register for being notified each time the connection between the device
and ManagementServer goes DOWN . |
void |
addMSNotifyListener(MSNotifyListener l)
This method is used by the ManagemntServer implementing MSNotifyListener to
register for being notified each time the ProtocolProvider gets
an Event PDU. |
int[] |
checkResponses()
This will return the array of request ids of the responses received by the Protocol Provider from the device agent. |
void |
close()
Close all the resources used by the ProtocolProvider . |
void |
combineSend(Property[] request)
This method should convert the list of generic request Property(s) into a single PDU for the corresponding protocol and send it to the device agent via the Protocol API . |
java.lang.String |
establishSession(Property p)
Establish session for communication with device based on the parameters in the request Property . |
java.util.Vector |
filterProperties(java.lang.Object pdu,
java.util.Vector props)
This method will be called by the ManagementServer to filter only the event request Property(s) which match the event PDU recieved by the ProtocolProvider. |
int |
genReqID()
This will generate a unique request id for the request to be sent through this provider. |
int |
getCommunicationMode()
Gets the the request response transaction mode between ProtocolProvider and device agent (asynchronous or synchronous) . |
java.lang.String |
getErrorString(byte errstat)
This method should convert protocol specific error status to a readable string message. |
boolean |
getShareSessions()
This method gets the mode whether the sessions towards the same devices are shared among Management clients for connection oriented protocols. |
ManagementServerResultEvent |
receive(int reqid)
Gets the result for send() as ManagementServerResultEvent for the given reqid returned for send(). |
void |
registerForNotification(Property p)
The Provider should register for recieving notifications based on the parameters in Property . |
void |
removeMSCallbackListener(MSCallbackListener msCBListener)
Unregister from being notified when the Provider recieves responses. |
void |
removeMSConnectionListener(MSConnectionListener l)
Unregister from being notified when the Provider recieves connection notifications. |
void |
removeMSNotifyListener(MSNotifyListener l)
Unregister from being notified when the Provider recieves notifications. |
int |
send(Property request)
This method should convert the generic request Property to a PDU for the corresponding protocol and send it to the device agent via the Protocol API. |
void |
sendAction(Property prop)
This method sends a generic request Property after converting it into a PDU for the corresponding protocol and send it to the device agent via the Protocol API . |
void |
setCommunicationMode(int mode)
Sets the the request response transaction mode between ProtocolProvider and device agent (asynchronous or synchronous) . |
void |
setDebug(boolean debug)
The provider should print debug messages and the PDU(s) on the console when this option is enabled. |
void |
setShareSessions(boolean shareDeviceSessionMode)
This method sets the mode whether the sessions towards the same devices can be shared among Management clients for connection oriented protocols. |
ManagementServerResultEvent |
syncSend(Property request)
This method should convert the generic request Property to a PDU for the corresponding protocol and send it to the device agent via the Protocol API . |
void |
terminateSession(Property p)
Disconnect session from communication with device based on the parameters in the request Property . |
void |
unregisterForNotification(Property p)
Unregister From Recieving Notifications based on the parameters in the request Property . |
| Field Detail |
public static final int ASYNC_COMM
public static final int SYNC_COMM
| Method Detail |
public ManagementServerResultEvent receive(int reqid)
reqid - - integer representing the request id.
public int send(Property request)
throws java.lang.Exception
request - - The request to be sent to the device
agent.
public ManagementServerResultEvent syncSend(Property request)
throws java.lang.Exception
request - - The request to be sent to the protocol agent.public int getCommunicationMode()
public void setCommunicationMode(int mode)
throws java.lang.Exception
- - SYNC_COMM / ASYNC_COMM.public int[] checkResponses()
receive(int)
public void addMSCallbackListener(MSCallbackListener msCBlistener)
throws java.lang.Exception
MSCallbackListener to
register for being notified each time the ProtocolProvider gets
a response.msCBlistener - - MSCallbackListener object for which the responses are given
in asynchronous mode.
public void addMSNotifyListener(MSNotifyListener l)
throws java.lang.Exception
MSNotifyListener to
register for being notified each time the ProtocolProvider gets
an Event PDU.l - - MSNotifyListener object for which the notifications are given.public void removeMSNotifyListener(MSNotifyListener l)
l - - MSNotifyListener object.
public void addMSConnectionListener(MSConnectionListener msConListener)
throws java.lang.Exception
MSConnectionListener to
register for being notified each time the connection between the device
and ManagementServer goes DOWN .msConListener - - MSConnectionListener object for which the connection
notifications are given.public void removeMSConnectionListener(MSConnectionListener l)
l - - MSNotifyListener object.public void removeMSCallbackListener(MSCallbackListener msCBListener)
msCBlistener - - MSCallbackListener object.public int genReqID()
public void setDebug(boolean debug)
debug - - boolean representing the debug mode as true/false.public java.lang.String getErrorString(byte errstat)
errstat - - byte representing the Error Status.
public void close()
throws java.lang.Exception
public void registerForNotification(Property p)
p - - Property containing the necessary attributes
for recieving notifications.public void unregisterForNotification(Property p)
p - - Property instance used for Notification registeration.public java.lang.String establishSession(Property p)
p - - Property containing the necessary attributes for establishing
the device session.public void terminateSession(Property p)
p - - Property instance used for establishing the session.public boolean getShareSessions()
public void setShareSessions(boolean shareDeviceSessionMode)
throws java.lang.Exception
shareDeviceSessionMode - - Share device sessions mode. (true/false) .
public void combineSend(Property[] request)
throws java.lang.Exception
requests - - Property Array.
public void sendAction(Property prop)
throws java.lang.Exception
prop - - Property instance.
public java.util.Vector filterProperties(java.lang.Object pdu,
java.util.Vector props)
throws java.lang.Exception
pdu - - The event PDU recieved and the Property(s) to be
filtered .props - - The vector of properties registered for this
particular event.
|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||