public class ProducerInfo extends SupportsLastModified
PortletInvoker) by the FederatingPortletInvoker when it chooses which invoker to dispatch toEndpointConfigurationInfo memberRegistrationInfo memberServiceDescription returned by the producerServiceDescription for each
WSRP operation. However, since this relation can evolve over time, it is also necessary to be able to refresh it depending on the information returned by the producer as the
result of an interaction with it. In particular, the registration status might have changed or the cached information is staled. This updating of the producer metadata is
performed by the detailedRefresh(boolean) method, which is the most important method of this class.| Modifier and Type | Field and Description |
|---|---|
static Integer |
DEFAULT_CACHE_VALUE |
| Constructor and Description |
|---|
ProducerInfo(ConsumerRegistrySPI consumerRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister() |
RefreshResult |
detailedRefresh(boolean forceRefresh)
Refreshes the producer's information from the service description if required.
|
boolean |
equals(Object o) |
void |
eraseRegistrationInfo() |
Map<String,org.gatein.pc.api.Portlet> |
getAllPortletsMap() |
EndpointConfigurationInfo |
getEndpointConfigurationInfo() |
RegistrationInfo |
getExpectedRegistrationInfo() |
Integer |
getExpirationCacheSeconds() |
String |
getId() |
org.gatein.pc.api.info.EventInfo |
getInfoForEvent(QName name) |
String |
getKey() |
int |
getNumberOfPortlets() |
org.gatein.pc.api.Portlet |
getPortlet(org.gatein.pc.api.PortletContext portletContext)
Retrieve (possibly from cache) the
Portlet associated with the specified PortletContext. |
Map<String,org.gatein.pc.api.Portlet> |
getProducerOffereedPortletMap() |
PortletPropertyDescriptionResponse |
getPropertyDescriptionsFor(String portletHandle) |
RegistrationContext |
getRegistrationContext() |
RegistrationInfo |
getRegistrationInfo() |
ConsumerRegistrySPI |
getRegistry() |
CookieProtocol |
getRequiresInitCookie() |
Set<String> |
getSupportedCustomModes() |
Set<String> |
getSupportedCustomWindowStates() |
Collection<String> |
getSupportedOptions() |
int |
hashCode() |
boolean |
hasLocalRegistrationInfo() |
boolean |
isActive()
Determines whether the associated consumer is active.
|
boolean |
isModifyRegistrationRequired() |
boolean |
isRefreshNeeded(boolean considerCache) |
boolean |
isRegistered() |
boolean |
isRegistrationChecked() |
boolean |
isRegistrationRequired() |
void |
modifyRegistration() |
void |
modifyRegistration(boolean force) |
boolean |
refresh(boolean forceRefresh)
Refreshes the producer's information from the service description if required.
|
void |
register() |
void |
resetRegistration() |
void |
setActive(boolean active)
Activates or de-activate this Consumer.
|
void |
setActiveAndSave(boolean active) |
void |
setEndpointConfigurationInfo(EndpointConfigurationInfo endpointConfigurationInfo) |
void |
setExpirationCacheSeconds(Integer expirationCacheSeconds) |
void |
setId(String id) |
void |
setKey(String key) |
void |
setModifyRegistrationRequired(boolean modifyRegistrationRequired) |
void |
setRegistrationInfo(RegistrationInfo registrationInfo) |
void |
setSupportedOption(String option)
Public for tests
|
String |
toString() |
getLastModified, modifyNow, modifyNowIfNeeded, now, setLastModifiedpublic static final Integer DEFAULT_CACHE_VALUE
public ProducerInfo(ConsumerRegistrySPI consumerRegistry)
public ConsumerRegistrySPI getRegistry()
public String getKey()
public void setKey(String key)
public EndpointConfigurationInfo getEndpointConfigurationInfo()
public void setEndpointConfigurationInfo(EndpointConfigurationInfo endpointConfigurationInfo)
public RegistrationInfo getRegistrationInfo()
public void setRegistrationInfo(RegistrationInfo registrationInfo)
public boolean isRegistered()
public boolean isRegistrationRequired()
public boolean isRegistrationChecked()
public boolean hasLocalRegistrationInfo()
public boolean isActive()
public void setActive(boolean active)
public String getId()
public void setId(String id)
public void setActiveAndSave(boolean active)
public boolean isModifyRegistrationRequired()
public void setModifyRegistrationRequired(boolean modifyRegistrationRequired)
public CookieProtocol getRequiresInitCookie()
public RegistrationInfo getExpectedRegistrationInfo()
public boolean refresh(boolean forceRefresh)
throws org.gatein.pc.api.PortletInvokerException
forceRefresh - whether or not to force a refresh regardless of whether one would have been required based on
cache expirationtrue if the producer's information was just refreshed, false otherwiseorg.gatein.pc.api.PortletInvokerException - if registration was required but couldn't be achieved properlypublic RefreshResult detailedRefresh(boolean forceRefresh) throws org.gatein.pc.api.PortletInvokerException
forceRefresh - whether or not to force a refresh regardless of whether one would have been required based on
cache expirationRefreshResult objectorg.gatein.pc.api.PortletInvokerException - if registration was required but couldn't be achieved properlypublic org.gatein.pc.api.Portlet getPortlet(org.gatein.pc.api.PortletContext portletContext)
throws org.gatein.pc.api.PortletInvokerException
Portlet associated with the specified PortletContext.portletContext - the PortletContext identifying the portlet to be retrievedPortlet associated with the specified PortletContextorg.gatein.pc.api.PortletInvokerException - if no portlet with the specified PortletContext could be found or if an error happened while attempting to retrieve the portlet information
from the remote producer if the portlet couldn't be resolved from the local cachepublic Map<String,org.gatein.pc.api.Portlet> getProducerOffereedPortletMap() throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic Map<String,org.gatein.pc.api.Portlet> getAllPortletsMap() throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic int getNumberOfPortlets()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic Integer getExpirationCacheSeconds()
public void setExpirationCacheSeconds(Integer expirationCacheSeconds)
public RegistrationContext getRegistrationContext() throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic void resetRegistration()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic PortletPropertyDescriptionResponse getPropertyDescriptionsFor(String portletHandle)
public void register()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic void deregister()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic void modifyRegistration()
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic void modifyRegistration(boolean force)
throws org.gatein.pc.api.PortletInvokerException
org.gatein.pc.api.PortletInvokerExceptionpublic boolean isRefreshNeeded(boolean considerCache)
public void eraseRegistrationInfo()
public org.gatein.pc.api.info.EventInfo getInfoForEvent(QName name)
public Collection<String> getSupportedOptions()
public void setSupportedOption(String option)
option - a valid WSRP 2 option String, see WSRP2Constants' OPTIONS_* fields for valid values.Copyright © 2006-2014 GateIn. All Rights Reserved.