Class Target

java.lang.Object
org.glassfish.internal.api.Target

@Service public class Target extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.sun.enterprise.config.serverbeans.Server>
    Gets all instances present in the domain
    com.sun.enterprise.config.serverbeans.Cluster
    getCluster(String targetName)
    Returns the Cluster element for a given cluster name
    com.sun.enterprise.config.serverbeans.Config
    Returns the config element that represents a given cluster
    com.sun.enterprise.config.serverbeans.Cluster
    Given an instance that is part of a cluster, returns the Cluster element of the cluster to which the given instance belongs
    com.sun.enterprise.config.serverbeans.Config
    getConfig(String targetName)
    Given a name (of instance or cluster or config), returns the appropriate Config object
    List<com.sun.enterprise.config.serverbeans.Server>
    getInstances(String targetName)
    Given the name of a target, returns a list of Server objects.
    List<com.sun.enterprise.config.serverbeans.Server>
    Given a list instance names, get List
    com.sun.enterprise.config.serverbeans.Node
    getNode(String targetName)
     
    com.sun.enterprise.config.serverbeans.Config
    getServerConfig(String targetName)
    Returns config element that represents a given server
    boolean
    isCluster(String targetName)
    Checks if a given target is cluster or nor
    boolean
    Lets caller to know if the caller is in DAS
    boolean
    Lets caller to know if the caller is in an instance
    boolean
    isValid(String targetName)
    Given name of a target verifies if it is valid

    Methods inherited from class java.lang.Object

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

    • Target

      public Target()
  • Method Details

    • isThisDAS

      public boolean isThisDAS()
      Lets caller to know if the caller is in DAS
    • isThisInstance

      public boolean isThisInstance()
      Lets caller to know if the caller is in an instance
    • isCluster

      public boolean isCluster(String targetName)
      Checks if a given target is cluster or nor
      Parameters:
      targetName - the name of the target
      Returns:
      true if the target represents a cluster; false otherwise
    • getCluster

      public com.sun.enterprise.config.serverbeans.Cluster getCluster(String targetName)
      Returns the Cluster element for a given cluster name
      Parameters:
      targetName - the name of the target
      Returns:
      Cluster element that represents the cluster
    • getClusterConfig

      public com.sun.enterprise.config.serverbeans.Config getClusterConfig(String targetName)
      Returns the config element that represents a given cluster
      Parameters:
      targetName - the name of the target
      Returns:
      Config element representing the cluster
    • getServerConfig

      public com.sun.enterprise.config.serverbeans.Config getServerConfig(String targetName)
      Returns config element that represents a given server
      Parameters:
      targetName - the name of the target
      Returns:
      Config element representing the server instance
    • getConfig

      public com.sun.enterprise.config.serverbeans.Config getConfig(String targetName)
      Given a name (of instance or cluster or config), returns the appropriate Config object
      Parameters:
      targetName - name of target
      Returns:
      Config element of this target
    • getClusterForInstance

      public com.sun.enterprise.config.serverbeans.Cluster getClusterForInstance(String targetName)
      Given an instance that is part of a cluster, returns the Cluster element of the cluster to which the given instance belongs
      Parameters:
      targetName - name of target
      Returns:
      Cluster element to which this instance below
    • getInstances

      public List<com.sun.enterprise.config.serverbeans.Server> getInstances(List<String> names)
      Given a list instance names, get List
    • getNode

      public com.sun.enterprise.config.serverbeans.Node getNode(String targetName)
    • getInstances

      public List<com.sun.enterprise.config.serverbeans.Server> getInstances(String targetName)
      Given the name of a target, returns a list of Server objects. If given target is a standalone server, then the server's Server element is returned in the list. If the target is a cluster, then the list of Server elements that represent all server instances of that cluster is returned.
      Parameters:
      targetName - the name of the target
      Returns:
      list of Server elements that represent the target
    • getAllInstances

      public List<com.sun.enterprise.config.serverbeans.Server> getAllInstances()
      Gets all instances present in the domain
      Returns:
      list of Server elements that represent all instances
    • isValid

      public boolean isValid(String targetName)
      Given name of a target verifies if it is valid
      Parameters:
      targetName - name of the target
      Returns:
      true if the target is a valid cluster or server instance or a config