|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--osl.handler.RequestHandler
The request handler abstracts over the low-level transport layer interactions by providing an asynchronous/synchronous remote procedure call mechanism. Using the request handler, clients may invoke functions on other remote/local request handler clients. All that is required to make an invocation is the Name of the remote client, which may be obtained using the registry lookup functions.
Clients expose methods for remote requests by extending the RequestClient interface. Upon opening a new session, the request handler computes the set of remotely visible methods as follows:
This mechanism is provided so that clients may provide local services by declaring them public without accidentally exposing these services to remote clients.
TransportLayer,
RequestSession,
RequestException,
RequestClient| Field Summary | |
static boolean |
DEBUG
Set to true if you want debugging output. |
| Constructor Summary | |
RequestHandler()
The default class constructor. |
|
| Method Summary | |
void |
handlerInitialize(Scheduler S,
TransportLayer T,
NameService N)
This method is called to initialize a RequestHandler instance once it has been instantiatied. |
RequestSession |
handlerOpenSession(RequestClient client)
This method is called to open a new request handler session. |
RequestSession |
handlerOpenSession(RequestClient client,
PhysicalAddress request)
This method is called to open a new request handler session. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final boolean DEBUG
| Constructor Detail |
public RequestHandler()
| Method Detail |
public void handlerInitialize(Scheduler S,
TransportLayer T,
NameService N)
S - A reference to the scheduler which should be
used to schedule handler threads.T - A reference to the transport layer which should
be used to transmit and receive requests.N - A reference to the name service which should be
used to lookup the PhysicalAddress associated with a
particular name.
public RequestSession handlerOpenSession(RequestClient client)
throws RequestException
client - A reference to the object which will receive
remote requests for this session.
public RequestSession handlerOpenSession(RequestClient client,
PhysicalAddress request)
throws RequestException
client - A reference to the object which will receive
remote requests for this session.request - The physical address which the handler
should attempt to associate with this session.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||