|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is the interface to be implemented by the user
application to receive responses in asynchronous request-response
transactions and request-polling.
User applications must register the interface implementation (say testProtocolListenerImpl) while
sending the request.
Following example code snippet demonstrates how this can be accomplished.
//Set up a Property for sending a request
SnmpProperty property = new SnmpProperty();
//Set the Protocol specific parameters in the Protocol Property
//necessary for sending the request to a device .
property.setTargetHost("localhost");
property.setTargetPort(161);
property.setObjectID("1.5.0");
//Set the Object to which the result is to be applied.
//through ProtocolListener
// Implementation class of the ProtocolListener Interface
property.setComponent(testProtocolListenerImpl);
| Method Summary | |
void |
processError(Property property,
int errorIndex,
java.lang.String errorMessage)
This method is implemented by the User Client Applications to receive error responses in asynchronous request-response transactions and request-polling |
void |
processError(Property property,
java.lang.Object errorObject)
This method is implemented by the User Client Applications to receive error responses as objects in asynchronous request-response transactions and request-polling This gives a detailed status of the error. |
void |
setProtocolResult(Property property,
java.lang.Object result)
This method is implemented by the User Client Applications to receive responses in asynchronous request-response transactions and request-polling |
| Method Detail |
public void setProtocolResult(Property property,
java.lang.Object result)
property - - Property instance used in the request.result - - result object .
Currently the result object types supported are String ,Object[],Vector
and MCTableResult
public void processError(Property property,
int errorIndex,
java.lang.String errorMessage)
property - - Property instance used in the request.errorIndex - - An index used to identify the error type.
This index is defined by the Protocol Provider implementation.errorMessage - - A String message stating the error.
public void processError(Property property,
java.lang.Object errorObject)
property - - Property instance used in the request.errorObject - - An Object which gives details about the error.
This Object is defined by the Protocol Provider implementation.
|
WebNMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||