org.openspml.v2.provider
Interface SPMLMarshaller

All Known Implementing Classes:
SimpleSPMLMarshaller

public interface SPMLMarshaller

Author:
kent.spaulding@sun.com

Date: Jan 26, 2006


Method Summary
 java.lang.String getUniqueName()
          Marshaller implementations should provide a unique name.
 void init(java.util.Map config)
          Called during initialization.
 java.lang.String marshallResponse(Response responseType)
           
 Request unmarshallRequest(java.lang.String message)
          Process a request.
 

Method Detail

init

public void init(java.util.Map config)
          throws Spml2Exception
Called during initialization.

Throws:
Spml2Exception

getUniqueName

public java.lang.String getUniqueName()
Marshaller implementations should provide a unique name.

Returns:
get us a name to know this object by...

unmarshallRequest

public Request unmarshallRequest(java.lang.String message)
                          throws Spml2Exception
Process a request.

This is expected to take XML (or some other text format) and convert it to and from the Java classes in the msg package.

If the marshaller does not recognize the request, it must return null.

If the marshaller recognizes the message, it must return a properly formatted string (likely of XML) containing the entire response; including error responses.

The marshaller is expected to throw any exception, but should catch SPMLExceptions and return the approriately formatted response. Other exceptions will be handled in the upper levels.

Throws:
Spml2Exception

marshallResponse

public java.lang.String marshallResponse(Response responseType)
                                  throws Spml2Exception
Throws:
Spml2Exception


Copyright © Sun Microsystems, Inc. All Rights Reserved.