Class DeploymentManager

    • Constructor Detail

      • DeploymentManager

        public DeploymentManager()
    • Method Detail

      • addApp

        public void addApp​(App app)
        Receive an app for processing. Most commonly used by the various AppProvider implementations.
        Parameters:
        app - the app
      • getAppProviders

        public java.util.Collection<AppProvider> getAppProviders()
      • addAppProvider

        public void addAppProvider​(AppProvider provider)
      • setLifeCycleBindings

        public void setLifeCycleBindings​(java.util.Collection<AppLifeCycle.Binding> bindings)
      • insertLifeCycleNode

        public void insertLifeCycleNode​(java.lang.String existingFromNodeName,
                                        java.lang.String existingToNodeName,
                                        java.lang.String insertedNodeName)
        Convenience method to allow for insertion of nodes into the lifecycle.
        Parameters:
        existingFromNodeName - the existing node start
        existingToNodeName - the existing node end
        insertedNodeName - the new node to create between the existing nodes
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Description copied from class: ContainerLifeCycle
        Starts the managed lifecycle beans in the order they were added.
        Overrides:
        doStart in class ContainerLifeCycle
        Throws:
        java.lang.Exception
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Description copied from class: ContainerLifeCycle
        Stops the managed lifecycle beans in the reverse order they were added.
        Overrides:
        doStop in class ContainerLifeCycle
        Throws:
        java.lang.Exception
      • getAppByOriginId

        public App getAppByOriginId​(java.lang.String originId)
      • getApps

        public java.util.Collection<App> getApps()
      • getApps

        public java.util.Collection<App> getApps​(Node node)
        Get Set of Apps by Node
        Parameters:
        node - the node to look for.
        Returns:
        the collection of apps for the node
      • getAppsWithSameContext

        public java.util.List<App> getAppsWithSameContext​(App app)
      • getContextAttribute

        public java.lang.Object getContextAttribute​(java.lang.String name)
        Get a contextAttribute that will be set for every Context deployed by this provider.
        Parameters:
        name - context attribute name
        Returns:
        the context attribute value
      • getContextAttributes

        public AttributesMap getContextAttributes()
      • getDefaultLifeCycleGoal

        public java.lang.String getDefaultLifeCycleGoal()
      • getServer

        public Server getServer()
      • removeApp

        public void removeApp​(App app)
        Remove the app from the tracking of the DeploymentManager
        Parameters:
        app - if the app is Unavailable remove it from the deployment manager.
      • removeAppProvider

        public void removeAppProvider​(AppProvider provider)
      • removeContextAttribute

        public void removeContextAttribute​(java.lang.String name)
        Remove a contextAttribute that will be set for every Context deployed by this provider.
        Parameters:
        name - the context attribute name
      • requestAppGoal

        public void requestAppGoal​(App app,
                                   java.lang.String nodeName)
        Move an App through the AppLifeCycle to the desired Node, executing each lifecycle step in the process to reach the desired state.
        Parameters:
        app - the app to move through the process
        nodeName - the name of the node to attain
      • requestAppGoal

        @ManagedOperation(value="request the app to be moved to the specified lifecycle node",
                          impact="ACTION")
        public void requestAppGoal​(@Name("appId")
                                   java.lang.String appId,
                                   @Name("nodeName")
                                   java.lang.String nodeName)
        Move an App through the AppLifeCycle to the desired Node, executing each lifecycle step in the process to reach the desired state.
        Parameters:
        appId - the id of the app to move through the process
        nodeName - the name of the node to attain
      • setContextAttribute

        public void setContextAttribute​(java.lang.String name,
                                        java.lang.Object value)
        Set a contextAttribute that will be set for every Context deployed by this provider.
        Parameters:
        name - the context attribute name
        value - the context attribute value
      • setContextAttributes

        public void setContextAttributes​(AttributesMap contextAttributes)
      • setDefaultLifeCycleGoal

        public void setDefaultLifeCycleGoal​(java.lang.String defaultLifeCycleState)
      • undeployAll

        public void undeployAll()
      • isUseStandardBindings

        public boolean isUseStandardBindings()
      • setUseStandardBindings

        public void setUseStandardBindings​(boolean useStandardBindings)
      • getNodes

        public java.util.Collection<Node> getNodes()
      • getApps

        public java.util.Collection<App> getApps​(java.lang.String nodeName)
      • scope

        public void scope​(XmlConfiguration xmlc,
                          Resource webapp)
                   throws java.io.IOException
        Throws:
        java.io.IOException