Class AdminFactory

java.lang.Object
org.openspaces.admin.AdminFactory
Direct Known Subclasses:
InternalAdminFactory

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 Details

    • AdminFactory

      public AdminFactory()
  • Method Details

    • 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/log/xap_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 xap_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.
      Sets the username and password for discovery of secured services.
    • userDetails

      @Deprecated public AdminFactory userDetails(UserDetails userDetails)
      Deprecated.
      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.
      Since:
      9.1.1
    • setDiscoveryServices

      public void setDiscoveryServices(Class... discoveryServices)
      Set the service types that will be monitored
      Parameters:
      discoveryServices - GridServiceAgent, GridServiceManager, GridServiceContainer, 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: