org.xins.server.frontend
Class FrontendCallingConvention

java.lang.Object
  extended byorg.xins.common.manageable.Manageable
      extended byorg.xins.server.CallingConvention
          extended byorg.xins.server.CustomCallingConvention
              extended byorg.xins.server.frontend.FrontendCallingConvention

public final class FrontendCallingConvention
extends CustomCallingConvention

XINS Front-end Framework calling convention.

Since:
XINS 1.5.0.
Version:
$Revision: 1.32.2.3 $ $Date: 2007/02/01 10:01:26 $
Author:
Anthony Goubard

Nested Class Summary
 
Nested classes inherited from class org.xins.common.manageable.Manageable
Manageable.State
 
Field Summary
 
Fields inherited from class org.xins.common.manageable.Manageable
BOOTSTRAPPED, BOOTSTRAPPING, DEINITIALIZING, INITIALIZING, UNUSABLE, USABLE
 
Constructor Summary
FrontendCallingConvention(API api)
          Creates a new FrontendCallingConvention instance.
 
Method Summary
protected  void bootstrapImpl(PropertyReader bootstrapProperties)
          Performs the bootstrap procedure (actual implementation).
protected  FunctionRequest convertRequestImpl(HttpServletRequest httpRequest)
          Converts an HTTP request to a XINS request (implementation method).
protected  void convertResultImpl(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest)
          Converts a XINS result to an HTTP response (implementation method).
protected  void initImpl(PropertyReader runtimeProperties)
          Performs the initialization procedure (actual implementation).
 
Methods inherited from class org.xins.server.CustomCallingConvention
getAPI, getSupportedMethods, getSupportedMethods, matches, parseXMLRequest, parseXMLRequest
 
Methods inherited from class org.xins.common.manageable.Manageable
assertUsable, bootstrap, deinit, deinitImpl, getState, init, isBootstrapped, isUsable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrontendCallingConvention

public FrontendCallingConvention(API api)
                          throws IllegalArgumentException
Creates a new FrontendCallingConvention instance.

Parameters:
api - the API, needed for the SOAP messages, cannot be null.
Throws:
IllegalArgumentException - if api == null.
Method Detail

bootstrapImpl

protected void bootstrapImpl(PropertyReader bootstrapProperties)
                      throws MissingRequiredPropertyException,
                             InvalidPropertyValueException,
                             BootstrapException
Description copied from class: Manageable
Performs the bootstrap procedure (actual implementation). When this method is called from Manageable.bootstrap(PropertyReader), the state and the argument will have been checked and the state will have been set to Manageable.BOOTSTRAPPING.

The implementation of this method in class Manageable is empty.

Overrides:
bootstrapImpl in class Manageable
Parameters:
bootstrapProperties - the bootstrap properties, not null.
Throws:
BootstrapException - if the bootstrapping failed for any other reason.
MissingRequiredPropertyException - if a required property is not given.
InvalidPropertyValueException - if the value of a certain property is invalid.

initImpl

protected void initImpl(PropertyReader runtimeProperties)
                 throws MissingRequiredPropertyException,
                        InvalidPropertyValueException,
                        InitializationException
Description copied from class: Manageable
Performs the initialization procedure (actual implementation). When this method is called from Manageable.init(PropertyReader), the state and the argument will have been checked and the state will have been set to Manageable.INITIALIZING.

The implementation of this method in class Manageable is empty.

Overrides:
initImpl in class Manageable
Parameters:
runtimeProperties - the initialization properties, not null.
Throws:
InvalidPropertyValueException - if the value of a certain property is invalid.
InitializationException - if the initialization failed, for any other reason.
MissingRequiredPropertyException - if a required property is not given.

convertRequestImpl

protected FunctionRequest convertRequestImpl(HttpServletRequest httpRequest)
                                      throws InvalidRequestException,
                                             FunctionNotSpecifiedException
Converts an HTTP request to a XINS request (implementation method). This method should only be called from class CustomCallingConvention. Only then it is guaranteed that the httpRequest argument is not null.

Parameters:
httpRequest - the HTTP request, will not be null.
Returns:
the XINS request object, never null.
Throws:
InvalidRequestException - if the request is considerd to be invalid.
FunctionNotSpecifiedException - if the request does not indicate the name of the function to execute.

convertResultImpl

protected void convertResultImpl(FunctionResult xinsResult,
                                 HttpServletResponse httpResponse,
                                 HttpServletRequest httpRequest)
                          throws IOException
Converts a XINS result to an HTTP response (implementation method).

Parameters:
xinsResult - the XINS result object that should be converted to an HTTP response, will not be null.
httpResponse - the HTTP response object to configure, will not be null.
httpRequest - the HTTP request sent by the client, will not be null.
Throws:
IOException - if calling any of the methods in httpResponse causes an I/O error.


See http://www.xins.org/.