public class SnmpCommandProcessor extends Object implements CommandProcessor<Oid,SnmpErrorDescriptor>
| Constructor and Description |
|---|
SnmpCommandProcessor(IpAddress ipAddress,
SnmpCredentials credentials,
SnmpConnectionConfiguration connectionConfiguration,
ExecutorService taskExecutor)
Creates a SNMP Command Processor.
|
SnmpCommandProcessor(IpAddress ipAddress,
SnmpCredentials credentials,
SnmpConnectionConfiguration connectionConfiguration,
SnmpClient snmpClient)
Creates a SNMP Command Processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endSession()
Terminates the session.
|
void |
executeAsynchronously(List<Command<Oid>> commands,
CommandExecutionListener<Oid,SnmpErrorDescriptor> commandExecutionListener)
Asynchronously executes commands.
|
Result<Void,SnmpErrorDescriptor,Void> |
executeSynchronously(List<Command<Oid>> commands,
Long timeout)
Synchronously executes commands.
|
public SnmpCommandProcessor(IpAddress ipAddress, SnmpCredentials credentials, SnmpConnectionConfiguration connectionConfiguration, ExecutorService taskExecutor) throws NullPointerException, IOException
ipAddress - Target device IP Address.credentials - Device SNMP credentials.connectionConfiguration - SNMP connection configuration.taskExecutor - Executor used for asynchronously command execution
(to decouple execution of task i.e. to have a task executed in
the context of a worker thread instead of in the context of the
calling thread).NullPointerException - If any of the arguments is null.IOException - If an error occurs.public SnmpCommandProcessor(IpAddress ipAddress, SnmpCredentials credentials, SnmpConnectionConfiguration connectionConfiguration, SnmpClient snmpClient) throws NullPointerException, IOException
ipAddress - Target device IP Address.credentials - Device SNMP credentials.connectionConfiguration - SNMP connection configuration.snmpClient - The SNMP client interface.NullPointerException - If any of the arguments is null.IOException - If an error occurs.public Result<Void,SnmpErrorDescriptor,Void> executeSynchronously(List<Command<Oid>> commands, Long timeout)
CommandProcessorexecuteSynchronously in interface CommandProcessor<Oid,SnmpErrorDescriptor>commands - Commands to execute.timeout - Timeout, null to wait until the response is received.public void executeAsynchronously(List<Command<Oid>> commands, CommandExecutionListener<Oid,SnmpErrorDescriptor> commandExecutionListener)
CommandProcessorexecuteAsynchronously in interface CommandProcessor<Oid,SnmpErrorDescriptor>commands - Commands to execute.commandExecutionListener - Entity to notify execution state.public void endSession()
CommandProcessorendSession in interface CommandProcessor<Oid,SnmpErrorDescriptor>Copyright © 2014. All Rights Reserved.