|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.wsrp4j.producer.driver.WSRPEngine
Implements the WSRP-interfaces:
All methods are implemented by calling the corresponding sub-components (Producer- and Provider-side components). Additionally each method implementation performs high level checks (e.g. a parameter validation to ensure that all required input parameters are available) and maps internal exceptions to exceptions defined vy WSRP.
Involves additional servlet related objects -> no mapping of the interfaces possible
| Field Summary | |
private ConsumerRegistry |
consumerRegistry
|
private static WSRPEngine |
instance
|
private Logger |
logger
|
private ParameterChecker |
paramCheck
|
private Provider |
provider
|
private boolean |
registrationRequired
|
| Constructor Summary | |
private |
WSRPEngine()
Constructor reading the config from the properties file |
| Method Summary | |
private void |
checkCookie()
Internal method. |
private oasis.names.tc.wsrp.v1.types.MarkupType |
checkMarkupParams(oasis.names.tc.wsrp.v1.types.PortletDescription portletDescription,
oasis.names.tc.wsrp.v1.types.MarkupParams markupParams)
This method checks the MarkupParams from the consumer request and tries to find a match between the mimeType, mode, windowState and locale of the portlet description and the requested values. |
private void |
checkRegistration(oasis.names.tc.wsrp.v1.types.RegistrationContext registrationContext)
check if the registration handle is valid if not throw some RuntimeException |
oasis.names.tc.wsrp.v1.types.PortletContext |
clonePortlet(oasis.names.tc.wsrp.v1.types.ClonePortlet request)
Calls the PortletPool to clone a portlet. |
private void |
createSession()
Internal method. |
oasis.names.tc.wsrp.v1.types.ReturnAny |
deregister(oasis.names.tc.wsrp.v1.types.RegistrationContext request)
Deregisters a certain consumer identified by a registration handle within the ConsumerRegistry. |
oasis.names.tc.wsrp.v1.types.DestroyPortletsResponse |
destroyPortlets(oasis.names.tc.wsrp.v1.types.DestroyPortlets request)
Removes all portlets corresponding to the provided portlet handles from the PortletPool. |
static WSRPEngine |
getInstance()
Internal method. |
oasis.names.tc.wsrp.v1.types.MarkupResponse |
getMarkup(oasis.names.tc.wsrp.v1.types.GetMarkup request)
Requests the markup for rendering the current state of a portlet by calling the PortletInvoker. |
private Portlet |
getPortlet(oasis.names.tc.wsrp.v1.types.RegistrationContext registrationContext,
java.lang.String portletHandle)
Get the required portlet AND check for the registration. |
oasis.names.tc.wsrp.v1.types.PortletDescriptionResponse |
getPortletDescription(oasis.names.tc.wsrp.v1.types.GetPortletDescription request)
Fetches a PortletDescription from the DescriptionHandler. |
oasis.names.tc.wsrp.v1.types.PropertyList |
getPortletProperties(oasis.names.tc.wsrp.v1.types.GetPortletProperties request)
Fetches the current property values of a portlet and returns them. |
oasis.names.tc.wsrp.v1.types.PortletPropertyDescriptionResponse |
getPortletPropertyDescription(oasis.names.tc.wsrp.v1.types.GetPortletPropertyDescription request)
Returns a model description containing the property descriptions of all properties of a portlet. |
oasis.names.tc.wsrp.v1.types.ServiceDescription |
getServiceDescription(oasis.names.tc.wsrp.v1.types.GetServiceDescription request)
Allows a Producer to provide information about its capabilities. |
private oasis.names.tc.wsrp.v1.types.PortletContext |
handleCloneBeforeWrite(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
clone portlet and its session before performBlockingInteraction continues |
private oasis.names.tc.wsrp.v1.types.PortletContext |
handlePortletStateChange(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
checks if portlet may be accessed according to the PortletStateChange setting throws the appropriate exceptions or clones before write |
oasis.names.tc.wsrp.v1.types.ReturnAny |
initCookie(oasis.names.tc.wsrp.v1.types.InitCookie request)
Creates a new HTTP session and initializes it |
oasis.names.tc.wsrp.v1.types.RegistrationState |
modifyRegistration(oasis.names.tc.wsrp.v1.types.ModifyRegistration request)
Modifies the registration of a certain consumer. |
oasis.names.tc.wsrp.v1.types.BlockingInteractionResponse |
performBlockingInteraction(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
Invokes a blocking interaction with the adressed portlet by calling the PortletInvoker |
oasis.names.tc.wsrp.v1.types.RegistrationContext |
register(oasis.names.tc.wsrp.v1.types.RegistrationData request)
Calls the ConsumerRegistry to register a certain consumer. |
oasis.names.tc.wsrp.v1.types.ReturnAny |
releaseSessions(oasis.names.tc.wsrp.v1.types.ReleaseSessions request)
Destroys the sessions adressed by the delivered sessionIDs. |
oasis.names.tc.wsrp.v1.types.PortletContext |
setPortletProperties(oasis.names.tc.wsrp.v1.types.SetPortletProperties request)
Sets the properties of a portlet. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean registrationRequired
private Provider provider
private ConsumerRegistry consumerRegistry
private static WSRPEngine instance
private ParameterChecker paramCheck
private Logger logger
| Constructor Detail |
private WSRPEngine()
throws java.rmi.RemoteException
| Method Detail |
private void createSession()
throws WSRPException
WSRPException
public static WSRPEngine getInstance()
throws java.rmi.RemoteException
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.ServiceDescription getServiceDescription(oasis.names.tc.wsrp.v1.types.GetServiceDescription request)
throws java.rmi.RemoteException
Allows a Producer to provide information about its capabilities. Producers may choose to restrict the information returned in ServiceDescription based on the supplied RegistrationContext.
Checks registration (if required) by querying the ConsumerRegistry and calls the DescriptionHandler to get the service description.
getServiceDescription in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_ServiceDescription_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.RegistrationContext register(oasis.names.tc.wsrp.v1.types.RegistrationData request)
throws java.rmi.RemoteException
register in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.ReturnAny deregister(oasis.names.tc.wsrp.v1.types.RegistrationContext request)
throws java.rmi.RemoteException
deregister in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
java.rmi.RemoteException - The given registrationhandle is invalid / not yet registered
public oasis.names.tc.wsrp.v1.types.RegistrationState modifyRegistration(oasis.names.tc.wsrp.v1.types.ModifyRegistration request)
throws java.rmi.RemoteException
modifyRegistration in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
private void checkRegistration(oasis.names.tc.wsrp.v1.types.RegistrationContext registrationContext)
throws java.rmi.RemoteException,
WSRPException
registrationContext - the registration handle of the consumer
java.rmi.RemoteException
WSRPException
private Portlet getPortlet(oasis.names.tc.wsrp.v1.types.RegistrationContext registrationContext,
java.lang.String portletHandle)
throws java.rmi.RemoteException
registrationContext - portletHandle -
java.rmi.RemoteException
private void checkCookie()
throws WSRPException
WSRPException
private oasis.names.tc.wsrp.v1.types.MarkupType checkMarkupParams(oasis.names.tc.wsrp.v1.types.PortletDescription portletDescription,
oasis.names.tc.wsrp.v1.types.MarkupParams markupParams)
throws WSRPException
MarkupType object where the arrays
for modes and windowStates and locales have a length of one.
portletDescription - The description of the portlet.markupParams - The markup params from the consumer request
MarkupType object which should be used to call the portlet.
WSRPException - In case no match was found
public oasis.names.tc.wsrp.v1.types.MarkupResponse getMarkup(oasis.names.tc.wsrp.v1.types.GetMarkup request)
throws java.rmi.RemoteException
Requests the markup for rendering the current state of a portlet by calling the PortletInvoker.
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
Fetches the portlet description from the DescriptionHandler to figure out whether the portlet supports template processing or not. If so, it checks whether templates are provided or not.
getMarkup in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.BlockingInteractionResponse performBlockingInteraction(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
throws java.rmi.RemoteException
Invokes a blocking interaction with the adressed portlet by calling the PortletInvoker
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
performBlockingInteraction in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
private oasis.names.tc.wsrp.v1.types.PortletContext handlePortletStateChange(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
throws java.rmi.RemoteException,
WSRPException
request -
java.rmi.RemoteException
WSRPException
private oasis.names.tc.wsrp.v1.types.PortletContext handleCloneBeforeWrite(oasis.names.tc.wsrp.v1.types.PerformBlockingInteraction request)
throws java.rmi.RemoteException
request -
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.ReturnAny initCookie(oasis.names.tc.wsrp.v1.types.InitCookie request)
throws java.rmi.RemoteException
Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (if registration is required).
initCookie in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.ReturnAny releaseSessions(oasis.names.tc.wsrp.v1.types.ReleaseSessions request)
throws java.rmi.RemoteException
Destroys the sessions adressed by the delivered sessionIDs. Returns null by default.
Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
releaseSessions in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.PortletDescriptionResponse getPortletDescription(oasis.names.tc.wsrp.v1.types.GetPortletDescription request)
throws java.rmi.RemoteException
Fetches a PortletDescription from the DescriptionHandler.
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
getPortletDescription in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.PortletContext clonePortlet(oasis.names.tc.wsrp.v1.types.ClonePortlet request)
throws java.rmi.RemoteException
Calls the PortletPool to clone a portlet.
Throws InvalidHandleFault if there is no portlet to be cloned in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
clonePortlet in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.DestroyPortletsResponse destroyPortlets(oasis.names.tc.wsrp.v1.types.DestroyPortlets request)
throws java.rmi.RemoteException
Removes all portlets corresponding to the provided portlet handles from the PortletPool. All portlet handles refering to portlets that cannot be destroyed (e.g. portlet handles from Producer Offered Portlets) will be returned within the DestroyPortletResponse as DestroyFailed-objects.
Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
destroyPortlets in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.PortletContext setPortletProperties(oasis.names.tc.wsrp.v1.types.SetPortletProperties request)
throws java.rmi.RemoteException
Sets the properties of a portlet.
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
setPortletProperties in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.PropertyList getPortletProperties(oasis.names.tc.wsrp.v1.types.GetPortletProperties request)
throws java.rmi.RemoteException
Fetches the current property values of a portlet and returns them.
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
getPortletProperties in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
public oasis.names.tc.wsrp.v1.types.PortletPropertyDescriptionResponse getPortletPropertyDescription(oasis.names.tc.wsrp.v1.types.GetPortletPropertyDescription request)
throws java.rmi.RemoteException
Returns a model description containing the property descriptions of all properties of a portlet.
Throws InvalidHandleFault if there is no portlet in the PortletPool that corresponds to the provided portlet handle. Throws InvalidRegistration if there is no registration with the given registration handle available within the ConsumerRegistry (case registration is required).
getPortletPropertyDescription in interface oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortTyperequest - a generated wrapper containing all input arguments for this method
java.rmi.RemoteException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||