com.sun.jini.jeri.internal.runtime
Class DgcRequestDispatcher

java.lang.Object
  extended by com.sun.jini.jeri.internal.runtime.DgcRequestDispatcher
All Implemented Interfaces:
RequestDispatcher

public class DgcRequestDispatcher
extends Object
implements RequestDispatcher

Author:
peter

Field Summary
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 Summary
DgcRequestDispatcher(Unreferenced unrefCallback, ObjectTable table)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Logger logger

dgcDispatcherMethods

private static final Collection<Method> dgcDispatcherMethods

dgcServerCapabilities

private static final ServerCapabilities dgcServerCapabilities

unrefCallback

private final Unreferenced unrefCallback

table

private final ObjectTable table

idTable

private final java.util.concurrent.ConcurrentMap<Uuid,Target> idTable

dgcEnabledCount

private final java.util.concurrent.atomic.AtomicInteger dgcEnabledCount

dgcDispatcher

private final InvocationDispatcher dgcDispatcher

dgcServer

private final DgcServer dgcServer
Constructor Detail

DgcRequestDispatcher

DgcRequestDispatcher(Unreferenced unrefCallback,
                     ObjectTable table)
Method Detail

forTable

boolean forTable(ObjectTable table)

isReferenced

boolean isReferenced()

get

Target get(Uuid id)

put

void put(Target target)
   throws ExportException
Throws:
ExportException

remove

void remove(Target target,
            boolean gc)

hasDgcEnabledTargets

private boolean hasDgcEnabledTargets()

dispatch

public void dispatch(InboundRequest request)
Description copied from interface: RequestDispatcher
Processes an inbound request.

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.

Specified by:
dispatch in interface RequestDispatcher
Parameters:
request - the InboundRequest to use to read the request data and write the response

dispatchDgcRequest

private void dispatchDgcRequest(InboundRequest request)
                         throws IOException,
                                ObjectTable.NoSuchObject
Throws:
IOException
ObjectTable.NoSuchObject


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.