public interface WSRPConsumer extends org.gatein.pc.api.PortletInvoker, SessionEventListener
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Prepares this Consumer to be used: service is started, endpoints are ready.
|
void |
deactivate()
Removes this Consumer from service.
|
ExportInfo |
exportPortlets(List<String> portletHandles)
Asks the remote producer to export the specified portlets.
|
MigrationService |
getMigrationService()
Retrieves the MigrationService associated with this consumer.
|
String |
getProducerId()
Retrieves the identifier for the producer this consumer is associated with.
|
ProducerInfo |
getProducerInfo()
Retrieves the ProducerInfo associated with this consumer.
|
ProducerSessionInformation |
getProducerSessionInformationFrom(javax.servlet.http.HttpSession session)
Retrieves the session information for the producer associated with this consumer.
|
ProducerSessionInformation |
getProducerSessionInformationFrom(org.gatein.pc.api.invocation.PortletInvocation invocation)
Retrieves the session information for the producer associated with this consumer.
|
ImportInfo |
importPortlets(ExportInfo exportInfo,
List<String> portlets)
Imports the specified portlets as identified by their handles associated with a previous export operation as identified by the specified ExportInfo.
|
boolean |
isImportExportSupported()
Do we support the WSRP 2 import/export functionality?
|
boolean |
isRefreshNeeded()
Determines whether this consumer's information needs to be refreshed with respect to its associated remote producer.
|
boolean |
isUsingWSRP2()
Is this consumer compatible with WSRP 2?
|
RefreshResult |
refresh(boolean forceRefresh)
Refreshes this consumer, potentially bypassing any cache, from the associated remote producer.
|
void |
refreshProducerInfo()
Asks this consumer's ProducerInfo to refresh itself by querying the associated remote producer for its service description and parsing it, potentially triggering other WSRP
operations such as registration if required.
|
void |
releaseExport(ExportInfo exportInfo)
Tells the remote producer that we don't need the data associated with the specified ExportInfo.
|
void |
releaseSessions()
Releases all the sessions held by this Consumer
|
void |
start()
Gets this consumer ready to receive and send WSRP messages to the remote producer.
|
void |
stop()
Stops this consumer, making it unable to send or receive WSRP messages.
|
createClone, destroyClones, exportPortlet, getPortlet, getPortlets, getProperties, getProperties, getStatus, importPortlet, invoke, isActive, setPropertiesonSessionEventString getProducerId()
ProducerSessionInformation getProducerSessionInformationFrom(org.gatein.pc.api.invocation.PortletInvocation invocation)
invocation - a portlet invocation from which the session information should be extracted.ProducerSessionInformationProducerSessionInformation getProducerSessionInformationFrom(javax.servlet.http.HttpSession session)
session - the session from the information should be extracted.ProducerSessionInformationProducerInfo getProducerInfo()
void refreshProducerInfo()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionvoid releaseSessions()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionvoid activate()
throws Exception
Exceptionvoid deactivate()
throws Exception
Exceptionboolean isRefreshNeeded()
true if this consumer needs to be refreshed, false otherwiseRefreshResult refresh(boolean forceRefresh) throws org.gatein.pc.api.PortletInvokerException
forceRefresh - whether we want to force the refresh (i.e. bypass potential caches).org.gatein.pc.api.PortletInvokerExceptionvoid start()
throws Exception
Exceptionvoid stop()
throws Exception
ExceptionExportInfo exportPortlets(List<String> portletHandles) throws org.gatein.pc.api.PortletInvokerException
portletHandles - a list of handles identifying portlets to be exportedorg.gatein.pc.api.PortletInvokerExceptionvoid releaseExport(ExportInfo exportInfo) throws org.gatein.pc.api.PortletInvokerException
exportInfo - the metadata identifying the exported portlets we don't need anymoreorg.gatein.pc.api.PortletInvokerExceptionMigrationService getMigrationService()
boolean isImportExportSupported()
true if import/export is supported by this consumer, false otherwiseImportInfo importPortlets(ExportInfo exportInfo, List<String> portlets) throws org.gatein.pc.api.PortletInvokerException
exportInfo - the export metadata identifying which exported data we want to import from the remote producerportlets - a list of handles identifying which portlets we want to import from the available exported portlets associated with the specified ExportInfoorg.gatein.pc.api.PortletInvokerExceptionboolean isUsingWSRP2()
true if this consumer uses WSRP 2, false otherwiseCopyright © 2006-2014 GateIn. All Rights Reserved.