|
AdventNet Web NMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.management.Property
This class defines the generic Property object used by the
ManagementServices implementation for all transactions with user client
applications and Protocol Provider(s).
This abstract class is implemented by the ProtocolProvider(s) .
The applications instantiate the required Property , set it up
according to the transaction and submit it to
the ManagementServices implementation.
Applications use the method setComponent(Object) to pass
their Object reference to receive all asynchronous responses and
notifications.
Setting the parameters of a ProtocolProperty for performing Request Transactions with Management Services .
| Field Summary | |
static int |
OP_READ
Constant for specifying the type of operation like read to be done with this properties. |
static int |
OP_WRITE
Constant for specifying the type of operation like write to be done with this properties. |
static int |
RESULT_INT
Constant for specifying the type of int result |
static int |
RESULT_LONG
Constant for specifying the type of long result |
static int |
RESULT_OBJECT
Constant for specifying the type of Object result |
static int |
RESULT_STRING
Constant for specifying the type of String result |
| Constructor Summary | |
Property()
|
|
| Method Summary | |
void |
addSubProperty(java.lang.String tagName,
java.lang.String identifier,
java.lang.String type,
java.util.ArrayList params)
This method must be implemented by extented Property class to combine several request Property(s) into a single request Property. |
abstract void |
copy(Property p)
This will copy the attributes of the given Property instance into curent instance. |
abstract java.lang.String |
getCombinedPropKey()
Used by management server to support multiple ProtocolProperty(s) to be combined and send as single protocol PDU. |
java.lang.Object |
getComponent()
The ManagementServices uses this method to get the Object reference of applications to submit the respective responses and events. |
abstract java.lang.String |
getEventKey()
Used by the management server to support caching of event registrations. |
java.lang.String |
getFilterClass()
This is used by user client applications to get the name of the Class used for filtering the responses recieved from the ProtocolProvider before being given to the application. |
java.lang.String |
getFilterParameters()
This method is used to get the parameters to be passed as argument to the getFilteredObject method of the Filter class. |
java.lang.String |
getGroupName()
Get the groupname by which the default properties will be loaded from config file. |
java.lang.String |
getMethodName()
This is used to get the name of the method which gets the result for request response transactions . |
java.lang.String[] |
getMethodParameterClassNames()
Returns the class names of the parameters of the method which gets the result for request response transactions . |
java.lang.Object[] |
getMethodParameterValues()
Return the values of the parameters to be passed to the method which gets the result for request response transactions . |
int |
getMethodResultParameterIndex()
This is used to get the index of the method parameters for the method which gets the result for request response transactions . |
int |
getOperationType()
Return the type of the command which will specify whether the request is to read or write. |
long |
getPollInterval()
This is used to get the polling interval(in milliseconds) used for poll registration. |
abstract java.util.Hashtable |
getProperties()
This method will be used to get the values of the parameters in the Property . |
java.lang.String |
getPropertyType()
Get the type name of the Property. |
java.lang.Object |
getProtocolPDU()
This method is implemented by the extented Property class to return a protocol PDU for request Property . |
int |
getRequestID()
This method is used to get the requestId of a Property which is unique for each transaction between the ManagementServer and the ProtocolProvider. |
int |
getResultType()
This method is used by applications to get the Class type of result which is returned to the user client aplications in Request Response transactions. |
int |
getRetries()
This is used to get the number of retries specified for this Property. |
java.lang.String |
getSessionId()
Get the Session Id of the request Property. |
abstract java.lang.String |
getSessionKey()
Used by the management server to support device connection pooling. |
int |
getTimeout()
This method is used to get the timeout value (in milliseconds) of this Property. |
java.util.Hashtable |
getUserProperties()
The method returns all the user properties set in this Property object as a key,value pair in a java.lang.Properties object. |
java.lang.String |
getUserProperty(java.lang.String nam)
The method returns the value of user property present matching the name passed as argument. |
byte |
getWriteType()
Return the Class type of the value for the OP_WRITE operation. |
byte[] |
getWriteTypes()
Return the class types of the set of values to be set for the OP_WRITE operation. |
java.lang.String |
getWriteValue()
This is used to get the value specified for a OP_WRITE operation in a Property request . |
java.lang.String[] |
getWriteValues()
This is used to get the values specified for a OP_WRITE operation in a Property request . |
java.lang.String |
removeUserProperty(java.lang.String nam)
The method removes any user property present in the object matching the name passed as arguement and returns the value of the property if it exists, else null is returned. |
void |
setComponent(java.lang.Object obj)
Applications use this Method to pass their Object reference to receive asynchronous responses and notifications. |
void |
setFilterClass(java.lang.String fClass)
This is used by user client applications to set the name of a Class which implements the interface Filter
The responses recieved from the ProtocolProvider will be passed
to this filter before being given to the application. |
void |
setFilterParameters(java.lang.String fParam)
This method is used by user client applications to set the parameters to be passed as argument to the getFilteredObject method of the Filter class along with the response from the provider. |
void |
setGroupName(java.lang.String gName)
Set the groupname of the Property . |
void |
setMethodDetail(java.lang.String name,
int pos_result_parameter,
java.lang.String[] parameterClassNames,
java.lang.Object[] parameterValues)
This is used by applicatons to set the details of the method to get the result for request response transactions |
void |
setMethodName(java.lang.String name)
This method is set by the user client application to specify the method to which the result is to be given for Request-Response transactions. |
void |
setOperationType(int type)
Set the type of the command which will specify whether the request is to read or write. |
void |
setPollInterval(long p)
This is used to set the polling interval(in milliseconds) used for poll registration. |
abstract void |
setProperties(java.util.Hashtable p)
This method will be used by the ManagementServer to set the values of a list of parameters in the Property . |
void |
setPropertyType(java.lang.String type)
Set the type name of the Property. |
void |
setProtocolPDU(java.lang.Object pdu)
This method is used by the ManagementServer to set the ProtocolPDU for a request Property which it had obtained using getProtocolPDU from the ProtocolProvider . |
void |
setRequestID(int reqid)
This method is used by the ManagementServer to set the requestId of a Property which is unique for each transaction between the ManagementServer and the ProtocolProvider. |
void |
setResultType(int type)
This method is used by applications to set the Class type of result which is returned to the user client aplications in Request Response transactions. |
void |
setRetries(int r)
This is used to set the number of retries specified for a Property. |
void |
setSessionId(java.lang.String sesId)
Set the Session Id of the request Property. |
void |
setTimeout(int t)
This is used to set the timeout(in milliseconds) for this Property. |
void |
setUserProperty(java.lang.String nam,
java.lang.String val)
This method sets a user property to the Property Object. |
void |
setWriteType(byte type)
Set the Class type of the value for the OP_WRITE operation. |
void |
setWriteTypes(byte[] types)
Set the class types of the set of values to be set for the OP_WRITE operation. |
void |
setWriteValue(java.lang.String val)
This is used to set the value for a OP_WRITE operation in a Property request . |
void |
setWriteValues(java.lang.String[] vals)
This is used to set the values for a OP_WRITE operation in a Property request . |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int RESULT_INT
public static int RESULT_LONG
public static int RESULT_STRING
public static int RESULT_OBJECT
public static int OP_READ
public static int OP_WRITE
| Constructor Detail |
public Property()
| Method Detail |
public long getPollInterval()
public void setPollInterval(long p)
p - - Poll Interval to be set as long.public int getTimeout()
public void setTimeout(int t)
t - - Timeout to be set as int.public int getRetries()
public void setRetries(int r)
r - - Retries be set as int.public java.lang.String getWriteValue()
public void setWriteValue(java.lang.String val)
val - - write value be set as String.public java.lang.String[] getWriteValues()
public void setWriteValues(java.lang.String[] vals)
vals - - write values to be set as String array.public void setRequestID(int reqid)
ManagementServerResultEvent
to match the request.
reqid - - requestID of the request.public int getRequestID()
public abstract void setProperties(java.util.Hashtable p)
p - - Hashtable containing the attributes to be set as name, value pair.public abstract java.util.Hashtable getProperties()
public int getOperationType()
public void setOperationType(int type)
type - the value may be OP_READ or OP_WRITE or values
defined by the Protocol Provider's Property implementation.public int getResultType()
public void setResultType(int type)
type - - any one of the types in ,
RESULT_INT , RESULT_LONG , RESULT_STRING and RESULT_OBJECT.
public java.lang.Object getComponent()
public void setComponent(java.lang.Object obj)
ProtocolListener - To Receive asynchronous and Poll responses.
MSEventListener - To Receive Event notifications.
DeviceConnectionListener - To Receive Device session loss notifications for connection oriented protocols.
ExceptionListener - To Receive unhandled Exceptions in ManagementServer Framework .obj - - The Object instance for receiving asynchronous
responses and notifications.public java.lang.String getMethodName()
public void setMethodName(java.lang.String name)
name - - method name to be invoked as String.public int getMethodResultParameterIndex()
public java.lang.String[] getMethodParameterClassNames()
public java.lang.Object[] getMethodParameterValues()
public void setMethodDetail(java.lang.String name,
int pos_result_parameter,
java.lang.String[] parameterClassNames,
java.lang.Object[] parameterValues)
name - - the name of the method to be invoked .pos_result_parameter - - the position of the parameter to which the
result content will be passed on the method specified, name.parameterClassNames - - an array of type of the classes of
the parameters to the result method invoked .parameterValues - - an array of the values to be passed to the method's
parameters on default.
public void setGroupName(java.lang.String gName)
gName - the groupname associated with the set of properties
in file.public java.lang.String getGroupName()
public void setPropertyType(java.lang.String type)
type - - Property type as a String.public java.lang.String getPropertyType()
public void setFilterClass(java.lang.String fClass)
Filter
The responses recieved from the ProtocolProvider will be passed
to this filter before being given to the application.fClass - - filter class name.public java.lang.String getFilterClass()
public void setFilterParameters(java.lang.String fParam)
setFilterClass(String).fParam - - filter parameters.public java.lang.String getFilterParameters()
setFilterClass(String)public byte getWriteType()
public void setWriteType(byte type)
type - - type to set as byte.public byte[] getWriteTypes()
public void setWriteTypes(byte[] types)
types - - types to set as byte array.public java.lang.String getSessionId()
public void setSessionId(java.lang.String sesId)
sesId - - the Session Id as a String.public abstract java.lang.String getCombinedPropKey()
public abstract java.lang.String getEventKey()
public abstract java.lang.String getSessionKey()
public void setUserProperty(java.lang.String nam,
java.lang.String val)
nam - - the name of attribute as String.val - - the value of attribute as String.public java.lang.String getUserProperty(java.lang.String nam)
nam - - the name of attribute as String.public java.lang.String removeUserProperty(java.lang.String nam)
nam - - the name of attribute as String.public java.util.Hashtable getUserProperties()
public void addSubProperty(java.lang.String tagName,
java.lang.String identifier,
java.lang.String type,
java.util.ArrayList params)
ClientProperty .tagName - - A tag for identifying the transaction.identifier - - The main/key parameter for the transaction .type - - The type of the identifier.This is mainly
used to indicate method return types in Providers which use
method names as identifiers for performing transactions.params - - A list of parameters for the transaction.
This is mainly used to indicate method arguments in Providers which use
method names as identifiers for performing transactions.
Example: For SNMP the values could be ,
tagName - testTag , identifier - 1.1.0 , type -null , params - null .public java.lang.Object getProtocolPDU()
public void setProtocolPDU(java.lang.Object pdu)
public abstract void copy(Property p)
p - - Property to be copied.
|
AdventNet Web NMS 5 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||