org.openspml.v2.transport
Interface RPCDispatcher

All Known Implementing Classes:
SPMLViaSoapDispatcher

public interface RPCDispatcher

Author:
kent.spaulding@sun.com

Date: Jan 20, 2006


Method Summary
 java.lang.String dispatchRequest(java.lang.String message)
          Process a request.
 java.lang.String getContentType()
          If you handle a request of a given type, you also need to provide us with contentType string to return.
 void init(RPCRouter router, java.util.Map config)
          Called during router initialization.
 

Method Detail

init

public void init(RPCRouter router,
                 java.util.Map config)
          throws Spml2TransportException
Called during router initialization. The map contains init parameters. For example, this might be a Map made from a ServletConfig.

Throws:
Spml2TransportException

dispatchRequest

public java.lang.String dispatchRequest(java.lang.String message)
                                 throws Spml2TransportException
Process a request.

If the dispatcher does not recognize the message, it must return null. If the handler recognizes the message, it must return a properly formatted string of data containing the entire response; including error responses.

The dispatcher is allowed to throw any exception, it will be caught by the router and converted into a generic http error response; that will include the stacktrace, or a reference to where it can be found.

Throws:
Spml2TransportException

getContentType

public java.lang.String getContentType()
If you handle a request of a given type, you also need to provide us with contentType string to return.

Returns:
String representing the type.


Copyright © Sun Microsystems, Inc. All Rights Reserved.