Package org.gatein.pc.federation
Interface FederatingPortletInvoker
- All Superinterfaces:
org.gatein.pc.api.PortletInvoker
- All Known Implementing Classes:
FederatingPortletInvokerService
public interface FederatingPortletInvoker
extends org.gatein.pc.api.PortletInvoker
A portlet invoker that federates other invokers.
- Since:
- 2.4
- Version:
- $Revision: 5687 $
- Author:
- Julien Viet
-
Field Summary
Fields inherited from interface org.gatein.pc.api.PortletInvoker
LOCAL_PORTLET_INVOKER_ID -
Method Summary
Modifier and TypeMethodDescriptiongetFederatedInvoker(String federatedId) Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to thePortletInvokerResolverspecified usingsetPortletInvokerResolver(PortletInvokerResolver)if it's not initially resolved or returnsnullif a FederatedPortletInvoker is not found after going through the specified NullInvokerHandler resolution mechanism.Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already resolved).Set<org.gatein.pc.api.Portlet> Return only the portlets from local federated invokers.Set<org.gatein.pc.api.Portlet> Return only the portlets from remote federated invokers.Returns only the portlet invoker identifiers of the currently resolved invokers, which might be different from the set potentially resolvable invokers as returned bygetFederatedInvokerIds().booleanisResolved(String federatedId) Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker registeredInvoker) Registers an invoker.voidsetPortletInvokerResolver(PortletInvokerResolver portletResolver) Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution mechanism cannot find an associated invoker.voidunregisterInvoker(String federatedId) Unregisters the invoker associated with the specified identifier.Methods inherited from interface org.gatein.pc.api.PortletInvoker
createClone, destroyClones, exportPortlet, getPortlet, getPortlets, getProperties, getProperties, getStatus, importPortlet, invoke, isActive, setProperties
-
Method Details
-
registerInvoker
FederatedPortletInvoker registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker registeredInvoker) throws IllegalArgumentException Registers an invoker.- Parameters:
federatedId- the invoker id to registerregisteredInvoker- the invoker to register- Throws:
IllegalArgumentException- if the invoker is null or already registered
-
getFederatedInvoker
Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to thePortletInvokerResolverspecified usingsetPortletInvokerResolver(PortletInvokerResolver)if it's not initially resolved or returnsnullif a FederatedPortletInvoker is not found after going through the specified NullInvokerHandler resolution mechanism.- Parameters:
federatedId- the id- Returns:
- the invoker
- Throws:
IllegalArgumentException- if the id is null
-
getFederatedInvokerIds
Collection<String> getFederatedInvokerIds()Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already resolved).- Returns:
- a collection of all the resolvable portlet invoker identifiers
-
getResolvedInvokerIds
Collection<String> getResolvedInvokerIds()Returns only the portlet invoker identifiers of the currently resolved invokers, which might be different from the set potentially resolvable invokers as returned bygetFederatedInvokerIds().- Returns:
- a collection of the currently resolved portlet invoker identifiers
-
isResolved
Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.- Parameters:
federatedId- the identifier of the FederatedPortletInvoker to test for resolution status- Returns:
trueif the specified invoker is already resolved,falseotherwise- Throws:
IllegalArgumentException- if the specified invoker identifier is not among the known resolvable identifiers as returned bygetFederatedInvokerIds()
-
unregisterInvoker
Unregisters the invoker associated with the specified identifier.- Parameters:
federatedId- the identifier of the invoker to unregister- Throws:
IllegalArgumentException- if the identifier is null or no invoker is registered with this identifier- Since:
- 2.6
-
getLocalPortlets
Return only the portlets from local federated invokers.- Returns:
- a Set containing only the portlets from local federated invokers.
- Throws:
org.gatein.pc.api.PortletInvokerException
-
getRemotePortlets
Return only the portlets from remote federated invokers.- Returns:
- a Set containing only the portlets from remote federated invokers.
- Throws:
org.gatein.pc.api.PortletInvokerException
-
setPortletInvokerResolver
Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution mechanism cannot find an associated invoker.- Parameters:
portletResolver-
-