goldengate.snmp.test
Class GgSimpleSnmpClient

java.lang.Object
  extended by goldengate.snmp.test.GgSimpleSnmpClient

public class GgSimpleSnmpClient
extends Object

Simple SNMP Client (for testing purpose)

Author:
Frederic Bregier

Constructor Summary
GgSimpleSnmpClient(String clientAddress, int port)
           
 
Method Summary
static String extractSingleString(org.snmp4j.event.ResponseEvent event)
           
 org.snmp4j.event.ResponseEvent get(org.snmp4j.smi.OID[] oids)
          This method is capable of handling multiple OIDs
 String getAsString(org.snmp4j.smi.OID oid)
          Method which takes a single OID and returns the response from the agent as a String.
 void getAsString(org.snmp4j.smi.OID oids, org.snmp4j.event.ResponseListener listener)
          This method is capable of handling multiple OIDs linked with a listener
 List<List<String>> getTableAsStrings(org.snmp4j.smi.OID[] oids)
          Normally this would return domain objects or something else than this...
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GgSimpleSnmpClient

public GgSimpleSnmpClient(String clientAddress,
                          int port)
Parameters:
clientAddress -
port -
Method Detail

stop

public void stop()
          throws IOException
Throws:
IOException

getAsString

public String getAsString(org.snmp4j.smi.OID oid)
                   throws IOException
Method which takes a single OID and returns the response from the agent as a String.

Parameters:
oid -
Returns:
String
Throws:
IOException

getAsString

public void getAsString(org.snmp4j.smi.OID oids,
                        org.snmp4j.event.ResponseListener listener)
This method is capable of handling multiple OIDs linked with a listener

Parameters:
oids -
listener -
Throws:
IOException

get

public org.snmp4j.event.ResponseEvent get(org.snmp4j.smi.OID[] oids)
                                   throws IOException
This method is capable of handling multiple OIDs

Parameters:
oids -
Returns:
ResponseEvent
Throws:
IOException

getTableAsStrings

public List<List<String>> getTableAsStrings(org.snmp4j.smi.OID[] oids)
Normally this would return domain objects or something else than this...


extractSingleString

public static String extractSingleString(org.snmp4j.event.ResponseEvent event)


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.