net.jini.jeri.connection
Class ServerConnectionManager.Dispatcher

java.lang.Object
  extended by net.jini.jeri.connection.ServerConnectionManager.Dispatcher
All Implemented Interfaces:
RequestDispatcher
Enclosing class:
ServerConnectionManager

private static final class ServerConnectionManager.Dispatcher
extends Object
implements RequestDispatcher

Request dispatcher wrapper around the request dispatcher passed to handleConnection (i.e., the request dispatcher created by the runtime).


Field Summary
private  ServerConnection c
          The connection passed to handleConnection.
private  RequestDispatcher dispatcher
          The request dispatcher passed to handleConnection.
 
Constructor Summary
ServerConnectionManager.Dispatcher(RequestDispatcher dispatcher, ServerConnection c)
           
 
Method Summary
 void dispatch(InboundRequest req)
          Calls processRequestData on the connection, passing the streams from the specified inbound request, to obtain the request handle, wraps the mux inbound request, connection and handle in an inbound request, checks for accept permission, and calls dispatch on the underlying dispatcher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dispatcher

private final RequestDispatcher dispatcher
The request dispatcher passed to handleConnection.


c

private final ServerConnection c
The connection passed to handleConnection.

Constructor Detail

ServerConnectionManager.Dispatcher

ServerConnectionManager.Dispatcher(RequestDispatcher dispatcher,
                                   ServerConnection c)
Method Detail

dispatch

public void dispatch(InboundRequest req)
Calls processRequestData on the connection, passing the streams from the specified inbound request, to obtain the request handle, wraps the mux inbound request, connection and handle in an inbound request, checks for accept permission, and calls dispatch on the underlying dispatcher. If an IOException is thrown, catch it. It is assumed that the caller will always abort the request (even on normal return).

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


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