Class FederatingPortletInvokerService

java.lang.Object
org.gatein.pc.federation.impl.FederatingPortletInvokerService
All Implemented Interfaces:
org.gatein.pc.api.PortletInvoker, FederatingPortletInvoker

public class FederatingPortletInvokerService extends Object implements FederatingPortletInvoker
  • Field Summary

    Fields inherited from interface org.gatein.pc.api.PortletInvoker

    LOCAL_PORTLET_INVOKER_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gatein.pc.api.PortletContext
    createClone(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext)
     
    List<org.gatein.pc.api.state.DestroyCloneFailure>
    destroyClones(List<org.gatein.pc.api.PortletContext> portletContexts)
     
    org.gatein.pc.api.PortletContext
    exportPortlet(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext)
     
    Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the PortletInvokerResolver specified using FederatingPortletInvoker.setPortletInvokerResolver(PortletInvokerResolver) if it's not initially resolved or returns null if 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).
    getFederatedPortletInvokerFor(org.gatein.pc.api.PortletContext compoundPortletContext)
    Retrieves the portlet invoker associated with the specified compound portlet id or null if it is not found.
    Set<org.gatein.pc.api.Portlet>
    Return only the portlets from local federated invokers.
    org.gatein.pc.api.Portlet
    getPortlet(org.gatein.pc.api.PortletContext compoundPortletContext)
     
    Set<org.gatein.pc.api.Portlet>
     
    org.gatein.pc.api.state.PropertyMap
    getProperties(org.gatein.pc.api.PortletContext compoundPortletContext)
     
    org.gatein.pc.api.state.PropertyMap
    getProperties(org.gatein.pc.api.PortletContext compoundPortletContext, Set<String> keys)
     
    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 by FederatingPortletInvoker.getFederatedInvokerIds().
    org.gatein.pc.api.PortletStatus
    getStatus(org.gatein.pc.api.PortletContext portletContext)
     
    org.gatein.pc.api.PortletContext
    importPortlet(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext)
     
    org.gatein.pc.api.invocation.response.PortletInvocationResponse
    invoke(org.gatein.pc.api.invocation.PortletInvocation invocation)
     
    boolean
     
    boolean
    isResolved(String federatedId)
    Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.
    registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker federatedInvoker)
    Registers an invoker.
    void
    Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution mechanism cannot find an associated invoker.
    org.gatein.pc.api.PortletContext
    setProperties(org.gatein.pc.api.PortletContext compoundPortletContext, org.gatein.pc.api.state.PropertyChange[] changes)
     
    void
    Unregisters the invoker associated with the specified identifier.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FederatingPortletInvokerService

      public FederatingPortletInvokerService()
  • Method Details

    • registerInvoker

      public FederatedPortletInvoker registerInvoker(String federatedId, org.gatein.pc.api.PortletInvoker federatedInvoker)
      Description copied from interface: FederatingPortletInvoker
      Registers an invoker.
      Specified by:
      registerInvoker in interface FederatingPortletInvoker
      Parameters:
      federatedId - the invoker id to register
      federatedInvoker - the invoker to register
    • unregisterInvoker

      public void unregisterInvoker(String federatedId)
      Description copied from interface: FederatingPortletInvoker
      Unregisters the invoker associated with the specified identifier.
      Specified by:
      unregisterInvoker in interface FederatingPortletInvoker
      Parameters:
      federatedId - the identifier of the invoker to unregister
    • getFederatedInvoker

      public FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException
      Description copied from interface: FederatingPortletInvoker
      Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the PortletInvokerResolver specified using FederatingPortletInvoker.setPortletInvokerResolver(PortletInvokerResolver) if it's not initially resolved or returns null if a FederatedPortletInvoker is not found after going through the specified NullInvokerHandler resolution mechanism.
      Specified by:
      getFederatedInvoker in interface FederatingPortletInvoker
      Parameters:
      federatedId - the id
      Returns:
      the invoker
      Throws:
      IllegalArgumentException - if the id is null
    • getFederatedInvokerIds

      public Collection<String> getFederatedInvokerIds()
      Description copied from interface: FederatingPortletInvoker
      Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already resolved).
      Specified by:
      getFederatedInvokerIds in interface FederatingPortletInvoker
      Returns:
      a collection of all the resolvable portlet invoker identifiers
    • getResolvedInvokerIds

      public Collection<String> getResolvedInvokerIds()
      Description copied from interface: FederatingPortletInvoker
      Returns only the portlet invoker identifiers of the currently resolved invokers, which might be different from the set potentially resolvable invokers as returned by FederatingPortletInvoker.getFederatedInvokerIds().
      Specified by:
      getResolvedInvokerIds in interface FederatingPortletInvoker
      Returns:
      a collection of the currently resolved portlet invoker identifiers
    • isResolved

      public boolean isResolved(String federatedId) throws IllegalArgumentException
      Description copied from interface: FederatingPortletInvoker
      Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.
      Specified by:
      isResolved in interface FederatingPortletInvoker
      Parameters:
      federatedId - the identifier of the FederatedPortletInvoker to test for resolution status
      Returns:
      true if the specified invoker is already resolved, false otherwise
      Throws:
      IllegalArgumentException - if the specified invoker identifier is not among the known resolvable identifiers as returned by FederatingPortletInvoker.getFederatedInvokerIds()
    • getPortlets

      public Set<org.gatein.pc.api.Portlet> getPortlets() throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      getPortlets in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • getLocalPortlets

      public Set<org.gatein.pc.api.Portlet> getLocalPortlets() throws org.gatein.pc.api.PortletInvokerException
      Description copied from interface: FederatingPortletInvoker
      Return only the portlets from local federated invokers.
      Specified by:
      getLocalPortlets in interface FederatingPortletInvoker
      Returns:
      a Set containing only the portlets from local federated invokers.
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • getRemotePortlets

      public Set<org.gatein.pc.api.Portlet> getRemotePortlets() throws org.gatein.pc.api.PortletInvokerException
      Description copied from interface: FederatingPortletInvoker
      Return only the portlets from remote federated invokers.
      Specified by:
      getRemotePortlets in interface FederatingPortletInvoker
      Returns:
      a Set containing only the portlets from remote federated invokers.
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • getPortlet

      public org.gatein.pc.api.Portlet getPortlet(org.gatein.pc.api.PortletContext compoundPortletContext) throws IllegalArgumentException, org.gatein.pc.api.PortletInvokerException
      Specified by:
      getPortlet in interface org.gatein.pc.api.PortletInvoker
      Throws:
      IllegalArgumentException
      org.gatein.pc.api.PortletInvokerException
    • getStatus

      public org.gatein.pc.api.PortletStatus getStatus(org.gatein.pc.api.PortletContext portletContext) throws IllegalArgumentException, org.gatein.pc.api.PortletInvokerException
      Specified by:
      getStatus in interface org.gatein.pc.api.PortletInvoker
      Throws:
      IllegalArgumentException
      org.gatein.pc.api.PortletInvokerException
    • invoke

      public org.gatein.pc.api.invocation.response.PortletInvocationResponse invoke(org.gatein.pc.api.invocation.PortletInvocation invocation) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      invoke in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • createClone

      public org.gatein.pc.api.PortletContext createClone(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      createClone in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • destroyClones

      public List<org.gatein.pc.api.state.DestroyCloneFailure> destroyClones(List<org.gatein.pc.api.PortletContext> portletContexts) throws IllegalArgumentException, org.gatein.pc.api.PortletInvokerException, UnsupportedOperationException
      Specified by:
      destroyClones in interface org.gatein.pc.api.PortletInvoker
      Throws:
      IllegalArgumentException
      org.gatein.pc.api.PortletInvokerException
      UnsupportedOperationException
    • getProperties

      public org.gatein.pc.api.state.PropertyMap getProperties(org.gatein.pc.api.PortletContext compoundPortletContext, Set<String> keys) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      getProperties in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • getProperties

      public org.gatein.pc.api.state.PropertyMap getProperties(org.gatein.pc.api.PortletContext compoundPortletContext) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      getProperties in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • setProperties

      public org.gatein.pc.api.PortletContext setProperties(org.gatein.pc.api.PortletContext compoundPortletContext, org.gatein.pc.api.state.PropertyChange[] changes) throws IllegalArgumentException, org.gatein.pc.api.PortletInvokerException, UnsupportedOperationException
      Specified by:
      setProperties in interface org.gatein.pc.api.PortletInvoker
      Throws:
      IllegalArgumentException
      org.gatein.pc.api.PortletInvokerException
      UnsupportedOperationException
    • exportPortlet

      public org.gatein.pc.api.PortletContext exportPortlet(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      exportPortlet in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • importPortlet

      public org.gatein.pc.api.PortletContext importPortlet(org.gatein.pc.api.PortletStateType stateType, org.gatein.pc.api.PortletContext compoundPortletContext) throws org.gatein.pc.api.PortletInvokerException
      Specified by:
      importPortlet in interface org.gatein.pc.api.PortletInvoker
      Throws:
      org.gatein.pc.api.PortletInvokerException
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface org.gatein.pc.api.PortletInvoker
    • setPortletInvokerResolver

      public void setPortletInvokerResolver(PortletInvokerResolver portletResolver)
      Description copied from interface: FederatingPortletInvoker
      Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution mechanism cannot find an associated invoker.
      Specified by:
      setPortletInvokerResolver in interface FederatingPortletInvoker
      Parameters:
      portletResolver -
    • getFederatedPortletInvokerFor

      protected FederatedPortletInvoker getFederatedPortletInvokerFor(org.gatein.pc.api.PortletContext compoundPortletContext) throws IllegalArgumentException, org.gatein.pc.api.NoSuchPortletException
      Retrieves the portlet invoker associated with the specified compound portlet id or null if it is not found.
      Parameters:
      compoundPortletContext - the portlet context for which the invoker is to be retrieved
      Returns:
      the portlet invoker associated with the specified compound portlet id
      Throws:
      IllegalArgumentException - if the compound portlet id is not well formed or null
      org.gatein.pc.api.NoSuchPortletException - if not such portlet exist