Package org.openspaces.admin
Class AdminFactory
java.lang.Object
org.openspaces.admin.AdminFactory
- Direct Known Subclasses:
InternalAdminFactory
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a lookup group that will be used to find Lookup Services (using multicast) that will be used to listen for events.Adds a comma delimited string of groups that will be used to find the Lookup Services (using multicast).addLocator(String locator) Adds a lookup locator (ip and port) of the lookup service that will be used to listen for events.addLocators(String locators) Adds a comma delimited lookup locators (ip and port) of the lookup service that will be used to listen for events.adminFilter(AdminFilter adminFilter) Sets adminFilter, allows to filter services, machines and etc.create()Creates the admin and begins its listening for events from the lookup service.Creates the admin and begins its listening for events from the lookup service.credentials(String userName, String password) Sets the username and password for discovery of secured services.credentialsProvider(CredentialsProvider credentialsProvider) Sets the credentials provider that will be used when discovering secured services.Enables discovery of unmanaged spaces (spaces that are not started by being deployed within the Service Grid).voidsetDiscoveryServices(Class... discoveryServices) Set the service types that will be monitoredprotected AdminFactoryuseDaemonThreads(boolean useDaemonThreads) For backwards comparability reasons, all Admin worker threads are not daemon threads.useGsLogging(boolean useGsLogging) By default the Admin finds in classpath the GS logging config file.userDetails(UserDetails userDetails) Deprecated.userDetails(String userName, String password) Deprecated.Useinstead.
-
Constructor Details
-
AdminFactory
public AdminFactory()
-
-
Method Details
-
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
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
Adds a lookup group that will be used to find Lookup Services (using multicast) that will be used to listen for events. -
addGroups
Adds a comma delimited string of groups that will be used to find the Lookup Services (using multicast). -
addLocator
Adds a lookup locator (ip and port) of the lookup service that will be used to listen for events. -
addLocators
Adds a comma delimited lookup locators (ip and port) of the lookup service that will be used to listen for events. -
userDetails
Deprecated.Useinstead.Sets the username and password for discovery of secured services. -
userDetails
Deprecated.Useinstead.Sets the user details that will be used when discovering secured services. -
credentials
Sets the username and password for discovery of secured services. -
credentialsProvider
Sets the credentials provider that will be used when discovering secured services. -
adminFilter
Sets adminFilter, allows to filter services, machines and etc.- Since:
- 9.1.1
-
setDiscoveryServices
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
Enables discovery of unmanaged spaces (spaces that are not started by being deployed within the Service Grid). Defaults tofalse(unmanaged spaces are not discovered). -
singleThreadedEventListeners
-
create
Creates the admin and begins its listening for events from the lookup service. -
createAdmin
Creates the admin and begins its listening for events from the lookup service.- See Also:
-
instead.