IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.server
Class ServerFactory

java.lang.Object
  extended by com.ibm.websphere.objectgrid.server.ServerFactory

public final class ServerFactory
extends Object

A singleton factory for creating and retrieving the ObjectGrid Server singleton.

Since:
WAS XD 6.1 FIX3

Method Summary
static CatalogServerProperties getCatalogProperties()
          Returns the properties object instance used in configuring the catalog service aspects of the server.
static Server getInstance()
          Retrieves the Server singleton for the process, where the first call to this method will initialize the singleton.
static ServerProperties getServerProperties()
          Returns the properties object instance used in configuring the server.
static boolean isPropFileFound()
          Answers true if the ServerFactory was initialized with a server properties file.
static boolean isServerStarted()
          Checks whether the server was started or not
static boolean stopServer()
          Stops the server if it was previously started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isPropFileFound

public static boolean isPropFileFound()
Answers true if the ServerFactory was initialized with a server properties file.

Since:
7.1.1

getInstance

public static Server getInstance()
Retrieves the Server singleton for the process, where the first call to this method will initialize the singleton. Note, if user wants this server to include the Catalog Service in addition to any Containers they create, then prior to calling getInstance() for the first time on this process, get the CatalogServerProperties object via the getCatalogProperties() method on this class, and the call setCatalogServer(true) on that object. Containers can be created and started after the getInstance method is called. First create a DeploymentPolicy, and then pass that into the Server.createContainer method.

Returns:
The currently running server instance.
See Also:
CatalogServerProperties, Container, Server, DeploymentPolicyFactory, DeploymentPolicy

getServerProperties

public static ServerProperties getServerProperties()
Returns the properties object instance used in configuring the server.

Returns:
The properties object instance.

getCatalogProperties

public static CatalogServerProperties getCatalogProperties()
Returns the properties object instance used in configuring the catalog service aspects of the server.

Returns:
The properties object instance.

stopServer

public static boolean stopServer()
Stops the server if it was previously started

Returns:
true if server was stopped, false if not

isServerStarted

public static boolean isServerStarted()
Checks whether the server was started or not

Returns:
true if server was started, false if not

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.