@StableMinor(version="12.5", sinceVersion="4.0") public class GenericServiceInterface extends Object implements IServiceInterface
Constructor and Description |
---|
GenericServiceInterface() |
Modifier and Type | Method and Description |
---|---|
void |
instanceAdded(ServiceInterfaceInstanceConfig config,
ITransaction transaction)
Called by the service container to indicate that a service interface instance has been added
|
void |
instanceDeleted(ServiceInterfaceInstanceConfig config)
Called by the service container to indicate that a service interface instance has been
deleted
|
void |
instanceLoaded(ServiceInterfaceInstanceConfig config) |
void |
instanceUnLoaded(ServiceInterfaceInstanceConfig config)
Called by the service container to indicate that a service interface instance is about to be
destroyed
|
void |
load(ServiceInterfaceConfig config)
Called by the service interface container to indicate to a service interface that the service
interface is being placed into service.
|
void |
processAction(IServiceInterfaceActionRequest request,
IServiceInterfaceActionResponse response)
Called by the service interface container to allow the service interface to process an action
request.
|
void |
register(SessionConfig sessionConfig,
Node serviceInterfaceXmlNode,
ITransaction transaction)
Called by the service interface manager when a service interface definition is registered.
|
void |
render(IServiceInterfaceRenderRequest request,
IServiceInterfaceRenderResponse response)
Called by the service interface container to allow the service interface to generate the
content of the response based on its current state.
|
void |
renderBefore(IServiceInterfaceRenderRequest request,
IServiceInterfaceRenderResponse response)
Called by the service interface container before rendering the interface client side.
|
void |
unload()
Called by the service interface container to indicate to a service interface that the service
interface is being taken out of service.
|
public void register(SessionConfig sessionConfig, Node serviceInterfaceXmlNode, ITransaction transaction) throws PortalException
IServiceInterface
register
in interface IServiceInterface
sessionConfig
- TODOtransaction
- TODOPortalException
public void load(ServiceInterfaceConfig config) throws ServiceInterfaceException, PortalException
IServiceInterface
The service interface container calls the init
method exactly once after
instantiating the service interface. The init
method must complete
successfully before the service interface can receive any requests.
The service interface container cannot place the service interface into service if the
init
method
ServiceInterfaceException
load
in interface IServiceInterface
config
- a ServiceInterfaceConfig
object containing the service interface's
configuration and initialization parametersServiceInterfaceException
- if an exception has occurred that interferes with the service interface's
normal operation.PortalException
- if the service interface cannot perform the initialization at this time.public void unload() throws ServiceInterfaceException, PortalException
IServiceInterface
Before the service interface container calls the destroy method, it should allow any threads that are currently processing requests within the service interface object to complete execution. To avoid waiting forever, the service interface container can optionally wait for a predefined time before destroying the service interface object.
This method enables the service interface to do the following:
unload
in interface IServiceInterface
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void instanceLoaded(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
instanceLoaded
in interface IServiceInterface
config
- a ServiceInterfaceInstanceConfig
object containing the service
interface instance's configuration and initialization parametersServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void instanceUnLoaded(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
IServiceInterface
instanceUnLoaded
in interface IServiceInterface
config
- a ServiceInterfaceInstanceConfig
object containing the service
interface instance's configuration and initialization parametersServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void instanceAdded(ServiceInterfaceInstanceConfig config, ITransaction transaction) throws ServiceInterfaceException, PortalException
IServiceInterface
instanceAdded
in interface IServiceInterface
config
- a ServiceInterfaceInstanceConfig
object containing the service
interface instance's configuration and initialization parametersServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void instanceDeleted(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
IServiceInterface
instanceDeleted
in interface IServiceInterface
config
- a ServiceInterfaceInstanceConfig
object containing the service
interface instance's configuration and initialization parametersServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void processAction(IServiceInterfaceActionRequest request, IServiceInterfaceActionResponse response) throws ServiceInterfaceException, PortalException
IServiceInterface
RenderResponse.createActionURL()
method.
Typically, in response to an action request, a service interface updates state based on the information sent in the action request parameters. In an action the service interface may:
A client request triggered by an action URL translates into one action request and many render requests, one per service interface in the portal page. The action processing must be finished before the render requests can be issued.
processAction
in interface IServiceInterface
request
- the action requestresponse
- the action responseServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this timepublic void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
IServiceInterface
render
in interface IServiceInterface
request
- the render requestresponse
- the render responseServiceInterfaceException
- if the service interface has problems fulfilling the rendering requestPortalException
- if the service interface is unavailable to perform render at this timepublic void renderBefore(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
IServiceInterface
renderBefore
in interface IServiceInterface
request
- the render requestresponse
- the render responseServiceInterfaceException
- if the service interface has problems fulfilling the rendering requestPortalException
- if the service interface is unavailable to perform render at this timeLumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.