org.apache.muse.core.routing
Class AbstractMessageHandler
java.lang.Object
org.apache.muse.core.routing.AbstractMessageHandler
- All Implemented Interfaces:
- MessageHandler
- Direct Known Subclasses:
- AddHandler, GetDocumentHandler, GetHandler, GetMetadataHandler, GetMultipleHandler, QueryHandler, QueryRelationshipsHandler, ReflectionMessageHandler, SetHandler, SetTerminationTimeHandler, SubscribeHandler
- public abstract class AbstractMessageHandler
- extends java.lang.Object
- implements MessageHandler
AbstractMessageHandler is a convenience class that implements all of the
accessor methods of MessageHandler, leaving
only the serialization methods (fromXML(Element) and toXML(Object)).
- Author:
- Dan Jemiolo (danj)
Field Summary |
static java.lang.Object[] |
EMPTY_REQUEST
An empty array that can be shared to represent requests with zero
parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_REQUEST
public static final java.lang.Object[] EMPTY_REQUEST
- An empty array that can be shared to represent requests with zero
parameters.
AbstractMessageHandler
protected AbstractMessageHandler(java.lang.String actionURI,
QName requestQName)
- Parameters:
actionURI
- The WS-A Action URI this handler is used for.requestQName
- The QName of the element that wraps parameters for incoming
requests. This class will use the request name in order to
create an appropriate response name.- See Also:
createResponseName()
createResponseName
protected QName createResponseName()
- Creates the QName that will be used to package up all objects that
are serialized to XML with toXML(Object). The default behavior is
to take the local part of the request QName and add the "Response"
suffix to it. Thus, CreatePurchase becomes CreatePurchaseResponse.
Users can override this method to change the response name.
- Returns:
- A QName that is just like the request QName, but with the
"Response" suffix added to the end of the local part.
- See Also:
getRequestName()
,
getResponseName()
getAction
public java.lang.String getAction()
- Specified by:
getAction
in interface MessageHandler
- Returns:
- The WS-A Action associated with the handler's operation.
getMethod
public java.lang.reflect.Method getMethod()
- Specified by:
getMethod
in interface MessageHandler
- Returns:
- The Java method that should be used to execute the operation.
getRequestName
public final QName getRequestName()
- Specified by:
getRequestName
in interface MessageHandler
- Returns:
- The QName of the SOAP request element that deserializable
DOM Elements will be wrapped in.
getResponseName
public QName getResponseName()
- Specified by:
getResponseName
in interface MessageHandler
- Returns:
- The QName of the SOAP response element that deserializable
DOM Elements will be wrapped in.
setMethod
public void setMethod(java.lang.reflect.Method method)
- Specified by:
setMethod
in interface MessageHandler
- Parameters:
method
- The Java method that should be used to execute the operation.