|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.manageable.Manageable org.xins.server.CallingConvention org.xins.server.CustomCallingConvention org.xins.server.frontend.FrontendCallingConvention
XINS Front-end Framework calling convention.
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). |
protected boolean |
matches(HttpServletRequest httpRequest)
Checks if the specified request can possibly be handled by this calling convention as a function invocation. |
Methods inherited from class org.xins.server.CustomCallingConvention |
getAPI, getSupportedMethods, getSupportedMethods, 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 |
public FrontendCallingConvention(API api) throws IllegalArgumentException
FrontendCallingConvention
instance.
api
- the API, needed for the SOAP messages, cannot be null
.
IllegalArgumentException
- if api == null
.Method Detail |
protected void bootstrapImpl(PropertyReader bootstrapProperties) throws MissingRequiredPropertyException, InvalidPropertyValueException, BootstrapException
Manageable
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.
bootstrapImpl
in class Manageable
bootstrapProperties
- the bootstrap properties, not null
.
MissingRequiredPropertyException
- if a required property is not given.
BootstrapException
- if the bootstrapping failed for any other reason.
InvalidPropertyValueException
- if the value of a certain property is invalid.protected void initImpl(PropertyReader runtimeProperties) throws MissingRequiredPropertyException, InvalidPropertyValueException, InitializationException
Manageable
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.
initImpl
in class Manageable
runtimeProperties
- the initialization properties, not null
.
MissingRequiredPropertyException
- if a required property is not given.
InvalidPropertyValueException
- if the value of a certain property is invalid.
InitializationException
- if the initialization failed, for any other reason.protected boolean matches(HttpServletRequest httpRequest) throws Exception
CustomCallingConvention
Implementations of this method should be optimized for performance, as this method may be called for each incoming request. Also, this method should not have any side-effects except possibly some caching in case there is a match.
The default implementation of this method always returns
true
.
If this method throws any exception, the exception is logged as an
ignorable exception and false
is assumed.
This method should only be called by the XINS/Java Server Framework.
matches
in class CustomCallingConvention
httpRequest
- the HTTP request to investigate, never null
.
true
if this calling convention is possibly
able to handle this request, or false
if it is
definitely not able to handle this request.
Exception
- if analysis of the request causes an exception; in this case
false
will be assumed by the framework.protected FunctionRequest convertRequestImpl(HttpServletRequest httpRequest) throws InvalidRequestException, FunctionNotSpecifiedException
CustomCallingConvention
.
Only then it is guaranteed that the httpRequest
argument is
not null
.
httpRequest
- the HTTP request, will not be null
.
null
.
InvalidRequestException
- if the request is considerd to be invalid.
FunctionNotSpecifiedException
- if the request does not indicate the name of the function to execute.protected void convertResultImpl(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest) throws IOException
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
.
IOException
- if calling any of the methods in httpResponse
causes an
I/O error.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |