|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- The request type handled by connected handlers.public interface HandlerLink<R>
A handler link represents a connection to the next
handler
in a given handler chain.
A link is invoked from the previous handler that could not handle a request, forwarding the both the request and the (unsuccessful) handler itself.
A handler chain will normally be represented as a
HandlerChain
object, but this is not a requirement.
Method Summary | |
---|---|
Handler<R> |
forward(R request,
Handler<R> current)
Forwards the the request supplied as request
to the handler represented by this link. |
Method Detail |
---|
Handler<R> forward(R request, Handler<R> current)
request
to the handler
represented by this link.
The next handler is the handler after current
in
the chain. current
can be located at any place
in the chain, and if not found, all handlers in the chain
are tried.
request
- The request to handle; nullability determined
by the actual handler implementation.current
- The handler in the chain that could not
handle request
; can be null if this
link represents the first handler in the chain.
request
, if any.
Can be null.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |