public interface SnmpCompletionService<V>
SnmpOperation
instances.Modifier and Type | Method and Description |
---|---|
boolean |
isIdle()
Tests whether this completion service has a remaining event that has
not yet been retrieved.
|
SnmpEvent<V> |
poll()
Gets an event representing a completed response if one is available.
|
SnmpEvent<V> |
poll(long timeout)
Gets a response event waiting as long as the specified duration for
one to become available.
|
void |
submit(SnmpOperation<V> operation)
Submits an operation to the service.
|
SnmpEvent<V> |
take()
Gets a completed response waiting until one becomes available.
|
boolean isIdle()
true
if an incomplete response event remainsSnmpEvent<V> poll()
null
if none is availableSnmpEvent<V> poll(long timeout) throws InterruptedException
timeout
- timeout in millisecondsnull
if one did not become available
within the specified time intervalInterruptedException
- if the calling thread is interrupted
while waitingSnmpEvent<V> take() throws InterruptedException
InterruptedException
- if the calling thread is interrupted
while waitingvoid submit(SnmpOperation<V> operation)
The operation is invoked asynchronously and its response is placed into the queue managed by this service. service.
operation
- the operation to invokeCopyright © 2012–2015. All rights reserved.