|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.rpc.handler.GenericHandler
org.systinet.wasp.handler.WaspGenericHandler
WaspGenericHandler is a WSO2 SOA Enablement Server modification of JAX-RPC
handler.
Invocation of jax-rpc handler methods is not symetrical in client-server view. The schema of
invocation is as follows:
CLIENT request handleRequest() ------> handleRequest() response handleResponse() <------- handleResponse()It is well enough until your want to create uniform handler for server and client. Imagine handler maintaining mutual authentication. HandleRequest() on client will perform credentials setup , while handleRequest() on server should perform credentials check. HandleResponse() on server will perform credentials setup , while handleResponse() on client should perform credentials check. Developer must have either two different implementation(special for client and server) or deal with handler location in its implementation. This is exactly what this helper do. Invocation looks like this:
CLIENT request handleOutput() ------> handleInput() response handleInput() <------- handleOutput()
Field Summary | |
protected QName[] |
headers
The headers initialized by HandlerInfo . |
Constructor Summary | |
WaspGenericHandler()
|
Method Summary | |
QName[] |
getHeaders()
Returns understands headers. |
boolean |
handleInput(MessageContext context)
This method is called by either handleRequest(javax.xml.rpc.handler.MessageContext) (on server) or handleResponse(javax.xml.rpc.handler.MessageContext) (on client). |
boolean |
handleOutput(MessageContext context)
This method is called by either handleRequest(javax.xml.rpc.handler.MessageContext) (on server) or handleResponse(javax.xml.rpc.handler.MessageContext) (on client). |
boolean |
handleRequest(MessageContext context)
Calls either handleInput(javax.xml.rpc.handler.MessageContext) or handleOutput(javax.xml.rpc.handler.MessageContext) depending on processing location(server or client) |
boolean |
handleResponse(MessageContext context)
Calls either handleInput(javax.xml.rpc.handler.MessageContext) or handleOutput(javax.xml.rpc.handler.MessageContext) depending on processing location(server or client) |
void |
init(HandlerInfo config)
Retrieves headers from the given config . |
Methods inherited from class javax.xml.rpc.handler.GenericHandler |
destroy, handleFault |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected volatile QName[] headers
HandlerInfo
.
init(javax.xml.rpc.handler.HandlerInfo)
Constructor Detail |
public WaspGenericHandler()
Method Detail |
public final boolean handleRequest(MessageContext context)
handleInput(javax.xml.rpc.handler.MessageContext)
or handleOutput(javax.xml.rpc.handler.MessageContext)
depending on processing location(server or client)
handleRequest
in interface Handler
handleRequest
in class GenericHandler
context
- SOAPMessageContext
true
means process next handler, false
means stop processing and return response to client(on server) or stop processing and
deserialize response(on client)Handler.handleRequest(javax.xml.rpc.handler.MessageContext)
public final boolean handleResponse(MessageContext context)
handleInput(javax.xml.rpc.handler.MessageContext)
or handleOutput(javax.xml.rpc.handler.MessageContext)
depending on processing location(server or client)
handleResponse
in interface Handler
handleResponse
in class GenericHandler
context
- SOAPMessageContext
true
means process next handler, false
means stop processing and return response to client(on server) or stop processing and
deserialize response(on client)Handler.handleResponse(javax.xml.rpc.handler.MessageContext)
public boolean handleInput(MessageContext context)
handleRequest(javax.xml.rpc.handler.MessageContext)
(on server) or handleResponse(javax.xml.rpc.handler.MessageContext)
(on client).
It used as a helper for symetric handler implementation. It is substitution of deprecated
headerprocessor invocation logic.
context
- SOAPMessageContext
true
means process next handler, false
means stop processing and return response to client(on server) or stop processing and
deserialize response(on client)public boolean handleOutput(MessageContext context)
handleRequest(javax.xml.rpc.handler.MessageContext)
(on server) or handleResponse(javax.xml.rpc.handler.MessageContext)
(on client).
It used as a helper for symetric handler implementation. It is substitution of deprecated
headerprocessor invocation logic.
context
- SOAPMessageContext
true
means process next handler, false
means stop processing and return response to client(on server) or stop processing and
deserialize response(on client)public void init(HandlerInfo config)
config
.
init
in interface Handler
init
in class GenericHandler
Handler.init(javax.xml.rpc.handler.HandlerInfo)
public QName[] getHeaders()
getHeaders
in interface Handler
getHeaders
in class GenericHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |