Class AbstractRequestContext<T>
- java.lang.Object
-
- org.opendaylight.openflowplugin.impl.rpc.AbstractRequestContext<T>
-
- All Implemented Interfaces:
AutoCloseable
,RequestContext<T>
,RequestFutureContext<T>
public abstract class AbstractRequestContext<T> extends Object implements RequestContext<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRequestContext(Long xid)
Deprecated.protected
AbstractRequestContext(org.opendaylight.yangtools.yang.common.Uint32 xid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>>
getFuture()
Method returns future to be used for handling device requests.long
getWaitTimeout()
Returns request timeout value.Xid
getXid()
Returns XID generated for this request.void
setResult(org.opendaylight.yangtools.yang.common.RpcResult<T> result)
void
setWaitTimeout(long waitTimeout)
Sets request timeout value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.device.RequestContext
close
-
-
-
-
Constructor Detail
-
AbstractRequestContext
protected AbstractRequestContext(org.opendaylight.yangtools.yang.common.Uint32 xid)
-
AbstractRequestContext
@Deprecated protected AbstractRequestContext(Long xid)
Deprecated.
-
-
Method Detail
-
getFuture
public final com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> getFuture()
Description copied from interface:RequestFutureContext
Method returns future to be used for handling device requests.- Specified by:
getFuture
in interfaceRequestFutureContext<T>
- Returns:
- rpc result
-
setResult
public final void setResult(org.opendaylight.yangtools.yang.common.RpcResult<T> result)
- Specified by:
setResult
in interfaceRequestFutureContext<T>
-
getXid
public final Xid getXid()
Description copied from interface:RequestContext
Returns XID generated for this request.- Specified by:
getXid
in interfaceRequestContext<T>
- Returns:
- Allocated XID, or null if the device has disconnected.
-
getWaitTimeout
public final long getWaitTimeout()
Description copied from interface:RequestContext
Returns request timeout value.- Specified by:
getWaitTimeout
in interfaceRequestContext<T>
- Returns:
- timeout
-
setWaitTimeout
public final void setWaitTimeout(long waitTimeout)
Description copied from interface:RequestContext
Sets request timeout value.- Specified by:
setWaitTimeout
in interfaceRequestContext<T>
-
-