GigaSpaces XAP 9.7.2 API

org.openspaces.admin
Class AdminFactory

java.lang.Object
  extended by org.openspaces.admin.AdminFactory

public class AdminFactory
extends Object

A factory allowing to create Admin instance.

Allows to set the Lookup Service Groups and Locators. The Admin listens for events from the lookup service of components added and removed. It will monitor all components that work within the specified group and locator.

Allows to set the credentials that will be used to authenticate when secured services are discovered.

Author:
kimchy

Constructor Summary
AdminFactory()
           
 
Method Summary
 AdminFactory addGroup(String group)
          Adds a lookup group that will be used to find Lookup Services (using multicast) that will be used to listen for events.
 AdminFactory addGroups(String groups)
          Adds a comma delimited string of groups that will be used to find the Lookup Services (using multicast).
 AdminFactory addLocator(String locator)
          Adds a lookup locator (ip and port) of the lookup service that will be used to listen for events.
 AdminFactory addLocators(String locators)
          Adds a comma delimited lookup locators (ip and port) of the lookup service that will be used to listen for events.
 AdminFactory adminFilter(AdminFilter adminFilter)
          Sets adminFilter, allows to filter services, machines and etc.
 Admin create()
          Creates the admin and begins its listening for events from the lookup service.
 Admin createAdmin()
          Creates the admin and begins its listening for events from the lookup service.
 AdminFactory credentials(String userName, String password)
          Sets the username and password for discovery of secured services.
 AdminFactory credentialsProvider(CredentialsProvider credentialsProvider)
          Sets the credentials provider that will be used when discovering secured services.
 AdminFactory discoverUnmanagedSpaces()
          Enables discovery of unmanaged spaces (spaces that are not started by being deployed within the Service Grid).
 void setDiscoveryServices(Class... discoveryServices)
          Set the service types that will be monitored
protected  AdminFactory singleThreadedEventListeners()
           
 AdminFactory useDaemonThreads(boolean useDaemonThreads)
          For backwards comparability reasons, all Admin worker threads are not daemon threads.
 AdminFactory useGsLogging(boolean useGsLogging)
          By default the Admin finds in classpath the GS logging config file.
 AdminFactory userDetails(String userName, String password)
          Deprecated. Use instead.
 AdminFactory userDetails(UserDetails userDetails)
          Deprecated. Use instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminFactory

public AdminFactory()
Method Detail

useGsLogging

public AdminFactory useGsLogging(boolean useGsLogging)
By default the Admin finds in classpath the GS logging config file. This file is used for the setting GS logging configuration. This file is searched under /config/gs_logging.properties User can set system property: -Djava.util.logging.config.file to use his own java logging configuration. GS logger will not overwrite it. Call this method with false to disable loading of gs_logging.properties by the admin API


useDaemonThreads

public AdminFactory useDaemonThreads(boolean useDaemonThreads)
For backwards comparability reasons, all Admin worker threads are not daemon threads. That means that creating a new admin object without closing it will leave non-daemon threads, which will prevent the JVM from shutting down. It is recommended to call this method with true in order to set all worker threads as daemon threads.


addGroup

public AdminFactory addGroup(String group)
Adds a lookup group that will be used to find Lookup Services (using multicast) that will be used to listen for events.


addGroups

public AdminFactory addGroups(String groups)
Adds a comma delimited string of groups that will be used to find the Lookup Services (using multicast).


addLocator

public AdminFactory addLocator(String locator)
Adds a lookup locator (ip and port) of the lookup service that will be used to listen for events.


addLocators

public AdminFactory addLocators(String locators)
Adds a comma delimited lookup locators (ip and port) of the lookup service that will be used to listen for events.


userDetails

@Deprecated
public AdminFactory userDetails(String userName,
                                           String password)
Deprecated. Use instead.

Sets the username and password for discovery of secured services.


userDetails

@Deprecated
public AdminFactory userDetails(UserDetails userDetails)
Deprecated. Use instead.

Sets the user details that will be used when discovering secured services.


credentials

public AdminFactory credentials(String userName,
                                String password)
Sets the username and password for discovery of secured services.


credentialsProvider

public AdminFactory credentialsProvider(CredentialsProvider credentialsProvider)
Sets the credentials provider that will be used when discovering secured services.


adminFilter

public AdminFactory adminFilter(AdminFilter adminFilter)
Sets adminFilter, allows to filter services, machines and etc.

Parameters:
adminFilter -
Since:
9.1.1

setDiscoveryServices

public void setDiscoveryServices(Class... discoveryServices)
Set the service types that will be monitored

Parameters:
discoveryServices - GridServiceAgent, GridServiceManager, GridServiceContainer , ElasticServiceManager, ProcessingUnit, Space
Throws:
IllegalArgumentException - if other type is provided
Since:
9.7.1

discoverUnmanagedSpaces

public AdminFactory discoverUnmanagedSpaces()
Enables discovery of unmanaged spaces (spaces that are not started by being deployed within the Service Grid). Defaults to false (unmanaged spaces are not discovered).


singleThreadedEventListeners

protected AdminFactory singleThreadedEventListeners()

create

public Admin create()
Creates the admin and begins its listening for events from the lookup service.


createAdmin

public Admin createAdmin()
Creates the admin and begins its listening for events from the lookup service.

See Also:
create()

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.