|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.SNMPConnector
public class SNMPConnector
The SNMPConnector implements get/set/walk and trap-receive operations by means of the IBM Tivoli SNMP Stack.
The connector can operate in two modes: Client and Trap Receiver - Client Mode
In client mode you can use it in iterator mode where the connector will send a getnext request to the snmp agent and return one entry for each OID returned by the agent. In Lookup mode the connector will perform a get request returning the oid/value for the requested oid. The link criteria specifies: oid and optionally server, port and version.
- Trap Receiver Mode
In trap receiver mode the connector can only be used in Iterator mode. The connector will listen for incoming snmp traps and return each as an entry to the caller. Both V1, V2c and V3 traps are handled.
Field Summary |
---|
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
SNMPConnector()
Constructor for the SNMPConnector object |
Method Summary | |
---|---|
boolean |
filter(com.tivoli.snmp.SnmpTrap trap)
Indicates that trap should be sent to this connector. |
Entry |
findEntry(SearchCriteria search)
Searches for an entry matching the specified search criteria. |
Entry |
getNextEntry()
Gets the nextEntry attribute of the SNMPConnector object |
String |
getVersion()
Version information. |
void |
handle(com.tivoli.snmp.SnmpTrap trap)
Trap listener |
void |
initialize(Object o)
This methods initializes the SNMP API library, reads the Connector configurations parameters, subscribes for SNMP Traps and opens an SNMP session. |
void |
putEntry(Entry entry)
Send SNMP data. |
void |
reconnect()
Reconnect to the underlying data source. |
Entry |
returnEntry(Object obj)
Checks the type of the given object. |
void |
selectEntries()
This method initializes the SNMP PDU (protocol data unit) to be sent on all subsequent getNextEntry calls as part of the get next request. |
void |
terminate()
This method unsubscribes from SNMP Trap events, terminates the SNMP API library, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
---|
deleteEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
Constructor Detail |
---|
public SNMPConnector()
Method Detail |
---|
public String getVersion()
getVersion
in interface VersionInfoInterface
public Entry getNextEntry() throws Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
Exception
- An exception is thrown if this method fails.ConnectorInterface.selectEntries()
public Entry returnEntry(Object obj) throws Exception
obj
- String, Entry or Exception.
Exception
- If the object is an Exception or is not an instance of the
above classes, an Exception is thrown.public void initialize(Object o) throws Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
o
- An object the AssemblyLine passes to the Connector on init
Exception
- An exception is thrown if this method fails.public void terminate()
terminate
in interface ConnectorInterface
terminate
in class Connector
public void selectEntries() throws Exception
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
Exception
- An exception is thrown if this method fails.public Entry findEntry(SearchCriteria search) throws Exception
findEntry
in interface ConnectorInterface
findEntry
in class Connector
search
- the search criteria
Exception
- An exception is thrown if this method fails.public void putEntry(Entry entry) throws Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- an entry containing the SNMP data to send
Exception
- An exception is thrown if this method fails.public boolean filter(com.tivoli.snmp.SnmpTrap trap)
filter
in interface com.tivoli.snmp.TrapFilter
trap
- the SnmpTrap
object.
public void handle(com.tivoli.snmp.SnmpTrap trap)
handle
in interface com.tivoli.snmp.TrapListener
trap
- The SNMP trap to be handledpublic void reconnect() throws Exception
reconnect
in class Connector
Exception
- if an error occurs.Connector.initialize(Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |