FileDocCategorySizeDatePackage
AppServerContext.javaAPI DocGlassfish v2 API6407Fri May 04 22:30:24 BST 2007com.sun.enterprise.jbi

AppServerContext

public interface AppServerContext
The JBI Runtime needs information on the servers/clusters in a domain, state of an instance etc. This is the interface to get this application server context information.
author
Sun Microsystems, Inc.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.String[]getClusterNames()
Get the names of all the clsuters in the domain.

return
an array of names of all the clusters in the domain. If the domain has zero clusters then an empty array is returned.

public java.lang.StringgetInstanceName()
Get the name of the server instance. In case this is the central administartion server then instance name = "server".

return
the name of the glassfish instance.

public javax.management.MBeanServerConnectiongetMBeanServerConnection(java.lang.String instanceName)
Get the MBeanServerConnection for a specific instance.

param
instanceName - instance name, the MBeanServerConnection for which is to be obtained.
return
the MBeanServerConnection to a given instance.
throws
Exception on errors

public java.lang.String[]getServersInCluster(java.lang.String clusterName)
Get the names of all the member servers in the specified cluster.

return
an array of names of all the servers in the cluster. If the clusterName is a non-existent cluster or does not have any member instances then an empty array is returned

public java.lang.String[]getStandaloneServerNames()
Get the names of all the non-clustered standalone servers in the domain.

return
an array of names of all the standalone servers in the domain.

public java.lang.StringgetTargetName(java.lang.String instanceName)
Get the "target" for the specified instance.
  • is the central admininistration server instance then target = "server"
  • is a clustered instance then target = [cluster-name]
  • is a standalone instance then target = [server-name]

param
instanceName - name of the instance, whose target is to be determined
return
the "target" for the specific instance

public java.lang.StringgetTargetName()
Get the "target" for this instance. If this instance :
  • is the central admininistration server instance then target = "server"
  • is a clustered instance then target = [cluster-name]
  • is a standalone instance then target = [server-name]

This is equivalent to calling getTargetName(getInstanceName()).

return
the "target" for this instance.

public booleanisDAS()
Determine if this instance is the central administration server.

return
true if this instance is the central administration server.

public booleanisInstanceClustered(java.lang.String instanceName)

return
true if the instance is clustered
param
instanceName - instance name

public booleanisInstanceUp(java.lang.String instanceName)
Determine the runtime state of an instance.

param
instanceName - name of the instance whose state is to be determined.
return
true if the specified instance is running false is it is shutdown

public booleanmultipleServersSupported()
Determine if the central administraion server supports multiple servers.

return
true if this administration server supports multiple servers.