FileDocCategorySizeDatePackage
ServerTarget.javaAPI DocGlassfish v2 API5368Fri May 04 22:34:10 BST 2007com.sun.enterprise.admin.target

ServerTarget

public class ServerTarget extends Target

Fields Summary
Constructors Summary
protected ServerTarget(String name, com.sun.enterprise.config.ConfigContext cc)

        super(name, cc);
    
Methods Summary
public com.sun.enterprise.config.serverbeans.ApplicationRef[]getApplicationRefs()
Return all the application refs of the server

        return ServerHelper.getApplicationReferences(getConfigContext(), getName());
    
public com.sun.enterprise.config.serverbeans.Cluster[]getClusters()
Return all the cluster associated with this server

        //list the cluster referenced by the server     
        final Cluster[] clusters = new Cluster[1];
        clusters[0] = ClusterHelper.getClusterForInstance(getConfigContext(), getName());
        return clusters;
    
public java.lang.StringgetConfigRef()

        final Config config = ServerHelper.getConfigForServer(getConfigContext(), getName());
        return config.getName();               
    
public ConfigTargetgetConfigTarget()

        return new ConfigTarget(getConfigRef(), getConfigContext());
    
public com.sun.enterprise.config.serverbeans.Config[]getConfigs()
Return all the configuration associated with this server

        final Config[] configs = new Config[1];        
        configs[0] = ServerHelper.getConfigForServer(getConfigContext(), getName());
        return configs;
    
public com.sun.enterprise.config.serverbeans.NodeAgent[]getNodeAgents()
Return the node agent associated with this server.

        NodeAgent[] agents = new NodeAgent[1];
        agents[0] = NodeAgentHelper.getNodeAgentForServer(getConfigContext(), getName());
        return agents;
    
public com.sun.enterprise.config.serverbeans.ResourceRef[]getResourceRefs()
Return all the resource refs of the server

         return ServerHelper.getResourceReferences(getConfigContext(), getName());
    
public com.sun.enterprise.config.serverbeans.Server[]getServers()
Return all the server

        final Server[] servers = new Server[1];
        servers[0] = ServerHelper.getServerByName(getConfigContext(), getName());
        return servers;
    
public java.lang.StringgetTargetObjectName(java.lang.String[] tokens)

        checkTokens(tokens, 1);
        return (tokens[0] + ":type=server,category=config,name=" + getName());
    
public TargetTypegetType()

        return TargetType.SERVER;