palio.modules
Class SNMP

java.lang.Object
  extended by palio.modules.core.Module
      extended by palio.modules.SNMP
All Implemented Interfaces:
palio.modules.core.CurrentModuleDataKeys

public class SNMP
extends palio.modules.core.Module


Field Summary
static java.util.Map<java.lang.String,palio.modules.snmp.listeners.SnmpPalioListener> globalListeners
           
 
Fields inherited from interface palio.modules.core.CurrentModuleDataKeys
DESIGNER_ACTIONS_BUFFER, HTML_FORM_BUILDER, HTML_MAP_BUILDER, HTML_MENU_BUILDER, HTML_TOOLTIPS_BUFFER, ITEXT_DOCUMENT, MAIL_MESSAGE, XLS_DOCUMENT, XML_DOCUMENT
 
Constructor Summary
SNMP(palio.Instance instance, java.util.Properties parameters)
          
 
Method Summary
 void addMibFile(java.lang.String context, java.lang.String fileName, java.lang.String fileContent)
          Adds mib file to selected context.
 void addV3user(java.lang.String userName, java.lang.String authAlgorithm, java.lang.String authPassword)
          Adds user for sending v3 packets.
 void addV3user(java.lang.String userName, java.lang.String authAlgorithm, java.lang.String authPassword, java.lang.String privAlgorithm, java.lang.String privPassword)
          Adds user for sending v3 packets.
 java.util.LinkedList<palio.modules.snmp.model.SnmpResponse> bufferGetById(java.lang.Long id)
          Retrieves all responses with given request id, retrieved responses are removed from buffer.
 palio.modules.snmp.model.SnmpResponse bufferGetLastById(java.lang.Long id)
          Retrieves latest response from buffer, removing it.
 palio.modules.snmp.model.SnmpResponse bufferPollFirst()
          Retrieves oldest response from buffer, removing it.
 void clearBuffer()
          Removes all responses from module responses buffer.
 void clearDatabase()
          Removes all stored responses from database.
 java.lang.String commandToOid(java.lang.String context, java.lang.String command)
          Tries to translate oid to command in given context.
 java.util.LinkedList<palio.modules.snmp.model.SnmpResponse> dbGetById(java.lang.Long id)
          Retrieves all responses with given request id from database.
 palio.modules.snmp.model.SnmpResponse dbGetLastById(java.lang.Long id)
          Retrieves latest response from database.
 java.lang.Long getA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids)
          Asynchronously gets multiple values from specified address at given object id.
 java.lang.Long getA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid)
          Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.
 java.lang.Long getA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids)
          Asynchronously gets multiple values from specified address at given object id.
 java.lang.String getEngineState()
          Returns current engine state.
 java.lang.String getEngineType()
          Returns current engine type.
 java.lang.String getListenerAddress()
          Returns address, on which module is currently listening.
 java.lang.Long getNextA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids)
          Asynchronously gets multiple oids for next values in tree from specified address at given object id.
 java.lang.Long getNextA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid)
          Asynchronously gets oid for next value in tree from specified address at given object id.
 java.lang.Long getNextA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids)
          Asynchronously gets multiple oids for next values in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.Object[] oids)
          Synchronously gets multiple oids for next values in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String oid)
          Synchronously gets oid for next value in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String[] oids)
          Synchronously gets multiple oids for next values in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids)
          Synchronously gets multiple oids for next values in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid)
          Synchronously gets oid for next value in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids)
          Synchronously gets multiple oids for next values in tree from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.Object[] oids)
          Synchronously gets multiple values from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String oid)
          Synchronously gets value from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String[] oids)
          Synchronously gets multiple values from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids)
          Synchronously gets multiple values from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid)
          Synchronously gets value from specified address at given object id.
 palio.modules.snmp.model.SnmpResponse getS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids)
          Synchronously gets multiple values from specified address at given object id.
 java.lang.String getSNMP4jVersion()
          Returns version of snmp4j library.
 palio.modules.snmp.model.SnmpV3User getV3user(java.lang.String userName)
          Retrieves v3 user.
 java.lang.String getVersion()
          Returns the module version
 java.lang.Boolean isMibContextComplete(java.lang.String context)
          Determines if context has one root.
 void registerResponseListener(palio.util.events.EventListener<palio.modules.snmp.model.SnmpResponse> listener)
          Adds custom listener to the module.
 void removeAllMibFiles()
          Clears all stored mib files.
 void removeContextMibFiles(java.lang.String context)
          Removes only context files.
 void removeMibFile(java.lang.String context, java.lang.String fileName)
          Removes fingle file.
 void removeV3user(java.lang.String userName)
          Removes specified user.
 java.lang.Long setA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids, java.lang.Object[] values, java.lang.Object[] types)
          Asynchronously sets multiple values of given objects ids at specified address.
 java.lang.Long setA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids, java.lang.String[] values, java.lang.String[] types)
          Asynchronously sets multiple values of given objects ids at specified address.
 java.lang.Long setA(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid, java.lang.String value, java.lang.String type)
          Asynchronously sets value of given object id at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.Object[] oids, java.lang.Object[] values, java.lang.Object[] types)
          Synchronously sets multiple values of given objects ids at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String[] oids, java.lang.String[] values, java.lang.String[] types)
          Synchronously sets multiple values of given objects ids at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String oid, java.lang.String value, java.lang.String type)
          Synchronously sets value of given object id at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Object[] oids, java.lang.Object[] values, java.lang.Object[] types)
          Synchronously sets multiple values of given objects ids at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String[] oids, java.lang.String[] values, java.lang.String[] types)
          Synchronously sets multiple values of given objects ids at specified address.
 palio.modules.snmp.model.SnmpResponse setS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String oid, java.lang.String value, java.lang.String type)
          Synchronously sets value of given object id at specified address.
 java.lang.Object[][] toArray(palio.modules.snmp.model.SnmpResponse response)
          Converts SnmpResponse to it's array representation.
 java.lang.String toString(palio.modules.snmp.model.SnmpResponse response)
          Converts SnmpResponse to it's String representation.
 palio.modules.snmp.model.SnmpResponse walkS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.Long timeout, java.lang.Long retries, java.lang.String rootOid, java.lang.Boolean branchOnly)
          Walks oid tree from given oid.
 palio.modules.snmp.model.SnmpResponse walkS(java.lang.String version, java.lang.String address, java.lang.String user, java.lang.String rootOid, java.lang.Boolean branchOnly)
          Walks oid tree from given oid.
 
Methods inherited from class palio.modules.core.Module
getConfigParam, getDescription, getModuleTranslation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

globalListeners

public static java.util.Map<java.lang.String,palio.modules.snmp.listeners.SnmpPalioListener> globalListeners
Constructor Detail

SNMP

public SNMP(palio.Instance instance,
            java.util.Properties parameters)

Method Detail

getVersion

public java.lang.String getVersion()
Description copied from class: palio.modules.core.Module
Returns the module version

Specified by:
getVersion in class palio.modules.core.Module
See Also:
Module.getVersion()

getSNMP4jVersion

public java.lang.String getSNMP4jVersion()
Returns version of snmp4j library.

Returns:
snmp4j version

getEngineState

public java.lang.String getEngineState()
Returns current engine state.

Returns:
engine state

getEngineType

public java.lang.String getEngineType()
Returns current engine type.

Returns:
engine type

getListenerAddress

public java.lang.String getListenerAddress()
Returns address, on which module is currently listening.

Returns:
address

toString

public java.lang.String toString(palio.modules.snmp.model.SnmpResponse response)
Converts SnmpResponse to it's String representation.

Parameters:
response -
Returns:
string representation

registerResponseListener

public void registerResponseListener(palio.util.events.EventListener<palio.modules.snmp.model.SnmpResponse> listener)
                              throws palio.modules.snmp.SNMPException
Adds custom listener to the module. Has effect only when module responses queue manager hasn't been started.

Parameters:
listener -
Throws:
palio.modules.snmp.SNMPException

toArray

public java.lang.Object[][] toArray(palio.modules.snmp.model.SnmpResponse response)
Converts SnmpResponse to it's array representation. First row contains status code, status, request id, next rows contains response values, one response value in one row. Response value rows contains oid, type, value.

Parameters:
response -
Returns:
array representation

clearBuffer

public void clearBuffer()
                 throws palio.modules.snmp.SNMPException
Removes all responses from module responses buffer.

Throws:
palio.modules.snmp.SNMPException

bufferPollFirst

public palio.modules.snmp.model.SnmpResponse bufferPollFirst()
                                                      throws palio.modules.snmp.SNMPException
Retrieves oldest response from buffer, removing it.

Returns:
response
Throws:
palio.modules.snmp.SNMPException

bufferGetById

public java.util.LinkedList<palio.modules.snmp.model.SnmpResponse> bufferGetById(java.lang.Long id)
                                                                          throws palio.modules.snmp.SNMPException
Retrieves all responses with given request id, retrieved responses are removed from buffer.

Parameters:
request - id
Returns:
responses for specified request
Throws:
palio.modules.snmp.SNMPException

bufferGetLastById

public palio.modules.snmp.model.SnmpResponse bufferGetLastById(java.lang.Long id)
                                                        throws palio.modules.snmp.SNMPException
Retrieves latest response from buffer, removing it.

Returns:
response
Throws:
palio.modules.snmp.SNMPException

clearDatabase

public void clearDatabase()
                   throws palio.modules.snmp.SNMPException
Removes all stored responses from database.

Throws:
palio.modules.snmp.SNMPException

dbGetById

public java.util.LinkedList<palio.modules.snmp.model.SnmpResponse> dbGetById(java.lang.Long id)
                                                                      throws palio.modules.snmp.SNMPException
Retrieves all responses with given request id from database.

Parameters:
request - id
Returns:
responses for specified request
Throws:
palio.modules.snmp.SNMPException

dbGetLastById

public palio.modules.snmp.model.SnmpResponse dbGetLastById(java.lang.Long id)
                                                    throws palio.modules.snmp.SNMPException
Retrieves latest response from database.

Returns:
response
Throws:
palio.modules.snmp.SNMPException

addV3user

public void addV3user(java.lang.String userName,
                      java.lang.String authAlgorithm,
                      java.lang.String authPassword)
               throws palio.modules.snmp.SNMPException
Adds user for sending v3 packets. It is possible to authenticate, when receiving such packets user data with passwords is also needed.

Parameters:
user - name
auth - algorithm
auth - password
Throws:
palio.modules.snmp.SNMPException

addV3user

public void addV3user(java.lang.String userName,
                      java.lang.String authAlgorithm,
                      java.lang.String authPassword,
                      java.lang.String privAlgorithm,
                      java.lang.String privPassword)
               throws palio.modules.snmp.SNMPException
Adds user for sending v3 packets. It is possible to authenticate or encrypt packets, when receiving such packets user data with passwords is also needed.

Parameters:
user - name
auth - algorithm
auth - password
priv - algorithm
priv - password
Throws:
palio.modules.snmp.SNMPException

removeV3user

public void removeV3user(java.lang.String userName)
                  throws palio.modules.snmp.SNMPException
Removes specified user. Has instant effect receiving packets addressed to that user.

Parameters:
user - name
Throws:
palio.modules.snmp.SNMPException

getV3user

public palio.modules.snmp.model.SnmpV3User getV3user(java.lang.String userName)
                                              throws palio.modules.snmp.SNMPException
Retrieves v3 user.

Parameters:
user - name
Returns:
given user with auth and priv data
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.String oid)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets value from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
timeout -
retries -
oid -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.String[] oids)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.Object[] oids)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.Long timeout,
                                                      java.lang.Long retries,
                                                      java.lang.String oid)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets oid for next value in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
timeout -
retries -
oid -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.Long timeout,
                                                      java.lang.Long retries,
                                                      java.lang.String[] oids)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.Long timeout,
                                                      java.lang.Long retries,
                                                      java.lang.Object[] oids)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.String oid,
                                                  java.lang.String value,
                                                  java.lang.String type)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets value of given object id at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set value requires type of that value, if not given, module will try receive it by getting that oid value. Response will contain current value of that oid.

Parameters:
version -
address -
user -
timeout -
retries -
oid -
value -
type -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.String[] oids,
                                                  java.lang.String[] values,
                                                  java.lang.String[] types)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
values -
types -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Long timeout,
                                                  java.lang.Long retries,
                                                  java.lang.Object[] oids,
                                                  java.lang.Object[] values,
                                                  java.lang.Object[] types)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids.

Parameters:
version -
address -
user -
timeout -
retries -
oids -
values -
types -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

walkS

public palio.modules.snmp.model.SnmpResponse walkS(java.lang.String version,
                                                   java.lang.String address,
                                                   java.lang.String user,
                                                   java.lang.Long timeout,
                                                   java.lang.Long retries,
                                                   java.lang.String rootOid,
                                                   java.lang.Boolean branchOnly)
                                            throws palio.modules.snmp.SNMPException
Walks oid tree from given oid. If branchOnly is true, will stop on leving branch that given oid spans. In response values will be all passed oid with values.

Parameters:
version -
address -
user -
timeout -
retries -
rootOid -
branchOnly -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.String oid)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets value from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
oid -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.String[] oids)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getS

public palio.modules.snmp.model.SnmpResponse getS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Object[] oids)
                                           throws palio.modules.snmp.SNMPException
Synchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user.

Parameters:
version -
address -
user -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.String oid)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets oid for next value in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
oid -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.String[] oids)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getNextS

public palio.modules.snmp.model.SnmpResponse getNextS(java.lang.String version,
                                                      java.lang.String address,
                                                      java.lang.String user,
                                                      java.lang.Object[] oids)
                                               throws palio.modules.snmp.SNMPException
Synchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself.

Parameters:
version -
address -
user -
oids -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.String oid,
                                                  java.lang.String value,
                                                  java.lang.String type)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets value of given object id at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set value requires type of that value, if not given, module will try receive it by getting that oid value. Response will contain current value of that oid.

Parameters:
version -
address -
user -
oid -
value -
type -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.String[] oids,
                                                  java.lang.String[] values,
                                                  java.lang.String[] types)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids.

Parameters:
version -
address -
user -
oids -
values -
types -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

setS

public palio.modules.snmp.model.SnmpResponse setS(java.lang.String version,
                                                  java.lang.String address,
                                                  java.lang.String user,
                                                  java.lang.Object[] oids,
                                                  java.lang.Object[] values,
                                                  java.lang.Object[] types)
                                           throws palio.modules.snmp.SNMPException
Synchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids.

Parameters:
version -
address -
user -
oids -
values -
types -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

walkS

public palio.modules.snmp.model.SnmpResponse walkS(java.lang.String version,
                                                   java.lang.String address,
                                                   java.lang.String user,
                                                   java.lang.String rootOid,
                                                   java.lang.Boolean branchOnly)
                                            throws palio.modules.snmp.SNMPException
Walks oid tree from given oid. If branchOnly is true, will stop on leving branch that given oid spans. In response values will be all passed oid with values.

Parameters:
version -
address -
user -
rootOid -
branchOnly -
Returns:
response if was received
Throws:
palio.modules.snmp.SNMPException

getA

public java.lang.Long getA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.String oid)
                    throws palio.modules.snmp.SNMPException
Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oid -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

getA

public java.lang.Long getA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.String[] oids)
                    throws palio.modules.snmp.SNMPException
Asynchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

getA

public java.lang.Long getA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.Object[] oids)
                    throws palio.modules.snmp.SNMPException
Asynchronously gets multiple values from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

getNextA

public java.lang.Long getNextA(java.lang.String version,
                               java.lang.String address,
                               java.lang.String user,
                               java.lang.String oid)
                        throws palio.modules.snmp.SNMPException
Asynchronously gets oid for next value in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oid -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

getNextA

public java.lang.Long getNextA(java.lang.String version,
                               java.lang.String address,
                               java.lang.String user,
                               java.lang.String[] oids)
                        throws palio.modules.snmp.SNMPException
Asynchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

getNextA

public java.lang.Long getNextA(java.lang.String version,
                               java.lang.String address,
                               java.lang.String user,
                               java.lang.Object[] oids)
                        throws palio.modules.snmp.SNMPException
Asynchronously gets multiple oids for next values in tree from specified address at given object id. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Gettin next oid returns only oid for next value, in place of value itself. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

setA

public java.lang.Long setA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.String oid,
                           java.lang.String value,
                           java.lang.String type)
                    throws palio.modules.snmp.SNMPException
Asynchronously sets value of given object id at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set value requires type of that value, if not given, module will try receive it by getting that oid value. Response will contain current value of that oid. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oid -
value -
type -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

setA

public java.lang.Long setA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.String[] oids,
                           java.lang.String[] values,
                           java.lang.String[] types)
                    throws palio.modules.snmp.SNMPException
Asynchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
values -
types -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

setA

public java.lang.Long setA(java.lang.String version,
                           java.lang.String address,
                           java.lang.String user,
                           java.lang.Object[] oids,
                           java.lang.Object[] values,
                           java.lang.Object[] types)
                    throws palio.modules.snmp.SNMPException
Asynchronously sets multiple values of given objects ids at specified address. User field determines community for 1 and 2c versions, for version 3 it is name of previously added user. Set values requires type of every value, if not given, module will try receive it by getting that oid values. Response will contain current values of that oids. Asynchronous get wont return response itself, it will return request id, on which response, when will be recived, could be received.

Parameters:
version -
address -
user -
oids -
values -
types -
Returns:
request id
Throws:
palio.modules.snmp.SNMPException

addMibFile

public void addMibFile(java.lang.String context,
                       java.lang.String fileName,
                       java.lang.String fileContent)
                throws palio.modules.snmp.SNMPException
Adds mib file to selected context. On every file adding context oid - command translations will be recalculated.

Parameters:
context -
fileName -
fileContent -
Throws:
palio.modules.snmp.SNMPException

removeAllMibFiles

public void removeAllMibFiles()
                       throws palio.modules.snmp.SNMPException
Clears all stored mib files.

Throws:
palio.modules.snmp.SNMPException

removeContextMibFiles

public void removeContextMibFiles(java.lang.String context)
                           throws palio.modules.snmp.SNMPException
Removes only context files.

Parameters:
context -
Throws:
palio.modules.snmp.SNMPException

removeMibFile

public void removeMibFile(java.lang.String context,
                          java.lang.String fileName)
                   throws palio.modules.snmp.SNMPException
Removes fingle file.

Parameters:
context -
fileName -
Throws:
palio.modules.snmp.SNMPException

commandToOid

public java.lang.String commandToOid(java.lang.String context,
                                     java.lang.String command)
                              throws palio.modules.snmp.SNMPException
Tries to translate oid to command in given context. Oid definitions are builded only from files in context, so it is possible to have separate translation spaces for different devices.

Parameters:
context -
command -
Returns:
oid
Throws:
palio.modules.snmp.SNMPException

isMibContextComplete

public java.lang.Boolean isMibContextComplete(java.lang.String context)
                                       throws palio.modules.snmp.SNMPException
Determines if context has one root.

Parameters:
context -
Returns:
null if no context, else checks if context has one root
Throws:
palio.modules.snmp.SNMPException