|
||||||||||
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 |
Fields inherited from interface com.ibm.di.server.CheckpointRestartInterface |
---|
RESTART_AFTER, RESTART_BEFORE, RESTART_IN |
Constructor Summary | |
---|---|
SNMPConnector()
Constructor for the SNMPConnector object |
Method Summary | |
---|---|
boolean |
filter(com.tivoli.snmp.SnmpTrap trap)
Trap filter - Returns true if a trap should be sent to this connector. |
Entry |
findEntry(SearchCriteria search)
Searches for an entry matching the specified search criteria. |
Entry |
getCheckpointInformation()
Returns the state information for the connector. |
Entry |
getNextEntry()
Gets the nextEntry attribute of the SNMPConnector object |
String |
getVersion()
Return 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. |
boolean |
isCheckpointRestartEnabled(int mode)
Components that support checkpoint/restart for a specific mode must return TRUE from this method. |
void |
prepareForRestart(ALState state,
Entry restartInfo,
int restartPoint)
Notifies the connector of a restart situation. |
void |
putEntry(Entry entry)
Send SNMP data. |
void |
reconnect()
Reconnect to the underlying data source. |
Entry |
returnEntry(Object obj)
|
void |
selectEntries()
This method inits 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.Connector.selectEntries()
public Entry returnEntry(Object obj) throws Exception
Exception
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
public void handle(com.tivoli.snmp.SnmpTrap trap)
handle
in interface com.tivoli.snmp.TrapListener
public boolean isCheckpointRestartEnabled(int mode)
isCheckpointRestartEnabled
in interface CheckpointRestartInterface
mode
- The mode the connector runs in
ServerConstants
public Entry getCheckpointInformation() throws Exception
getCheckpointInformation
in interface CheckpointRestartInterface
Exception
public void prepareForRestart(ALState state, Entry restartInfo, int restartPoint) throws Exception
prepareForRestart
in interface CheckpointRestartInterface
restartInfo
- The last entry object returned by the connector in the getCheckpointInformation methodstate
- The ALState object for the AssemblyLinerestartPoint
- The relative point where restarting is taking place (e.g. RESTART_BEFORE ...)
Exception
public void reconnect() throws Exception
Connector
reconnect
in class Connector
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |