public class DgcRequestDispatcher extends Object implements RequestDispatcher
Modifier and Type | Field and Description |
---|---|
private InvocationDispatcher |
dgcDispatcher |
private static Collection<Method> |
dgcDispatcherMethods |
private java.util.concurrent.atomic.AtomicInteger |
dgcEnabledCount |
private DgcServer |
dgcServer |
private static ServerCapabilities |
dgcServerCapabilities |
private java.util.concurrent.ConcurrentMap<Uuid,Target> |
idTable |
private static Logger |
logger |
private ObjectTable |
table |
private Unreferenced |
unrefCallback |
Constructor and Description |
---|
DgcRequestDispatcher(Unreferenced unrefCallback,
ObjectTable table) |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(InboundRequest request)
Processes an inbound request.
|
private void |
dispatchDgcRequest(InboundRequest request) |
(package private) boolean |
forTable(ObjectTable table) |
(package private) Target |
get(Uuid id) |
private boolean |
hasDgcEnabledTargets() |
(package private) boolean |
isReferenced() |
(package private) void |
put(Target target) |
(package private) void |
remove(Target target,
boolean gc) |
private static final Logger logger
private static final Collection<Method> dgcDispatcherMethods
private static final ServerCapabilities dgcServerCapabilities
private final Unreferenced unrefCallback
private final ObjectTable table
private final java.util.concurrent.ConcurrentMap<Uuid,Target> idTable
private final java.util.concurrent.atomic.AtomicInteger dgcEnabledCount
private final InvocationDispatcher dgcDispatcher
private final DgcServer dgcServer
DgcRequestDispatcher(Unreferenced unrefCallback, ObjectTable table)
boolean forTable(ObjectTable table)
boolean isReferenced()
void put(Target target) throws ExportException
ExportException
void remove(Target target, boolean gc)
private boolean hasDgcEnabledTargets()
public void dispatch(InboundRequest request)
RequestDispatcher
The supplied InboundRequest
is used to read the
request data and to write the response. The request is
processed in the current thread; this method does not return
until it is done processing the request.
After the invocation of this method completes (either by
returning normally or by throwing an exception), the supplied
InboundRequest
will be automatically terminated
(see InboundRequest.abort()
). If this method completes
before the close
method has been invoked on the
stream returned by the request's getResponseOutputStream
method, there is no guarantee that any or none of the data
written to the stream will be delivered; the implication is
that the implementation of this method is no longer interested
in the successful delivery of the response.
dispatch
in interface RequestDispatcher
request
- the InboundRequest
to use to read
the request data and write the responseprivate void dispatchDgcRequest(InboundRequest request) throws IOException, ObjectTable.NoSuchObject
IOException
ObjectTable.NoSuchObject
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.