*** This class provides Binary Compatibility only, not Source Compatibility ***
Class CorePlatformServices
The core foundation services include:
- Authentication
- Discovery
- Information
- Session
- User
Note that this class provides static methods to control the services facade.
Since this class is a convenience wrapper to the
PlatformServices facade which
likewise only provides static methods.
PlatformServices provides
the service startup/termination and general service finder capabilities. One
would typically use either this class or PlatformServices as
their facade.
- Since:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanAdds a repository definition to the running information service.static final voidAdds a services deployment listener which is interested in being notified of deployment state transitions.Gets the authentication service.static DiscoveryServiceInterfaceGets the discovery service.static InformationServiceInterfaceGets the information service.static final ServicesGets all available services.static SessionServiceInterfaceGets the session service.static UserServiceInterfaceGets the user service.static voidLocates any services defined for remote lookup by delegating the request to thePlatformServices.lookupRemoteServices()and then re-initializing handles to core platform services abstracted by this class.static final voidRemoves a services deployment listener which is no longer interested in being notified of deployment state transitions.static voidSpecifies the default SAS Foundation Services configuration with no LoggingService configuration.static final voidsetEnvironment(Environment environment) Specified the environment resources to be used by this facade.static final booleansetJAASAppConfigurationEntry(AppConfigurationEntry[] appConfigurationEntries) Updates this resource environment to use the specified JAASentries.static final voidsetServicesConfiguration(PlatformServicesConfiguration servicesConfiguration) Specifies the services configuration that is to be used by this facade.static SessionContextInterfacestartAndConnect(String clientApplication, ConnectionProfile connectionProfile) static voidStarts any services defined for local instantiation by delegating the request to thePlatformServices.startLocalServices()and then re-initializing handles to core platform services abstracted by this class.static voidStarts/looks up services by delegating the request to thePlatformServices.startServices()and then re-initializing handles to core platform services abstracted by this class.static voidTerminates services by null'ing references to the core services and then delegating the service termination request to thePlatformServicesfacade.static voidVerify that the core services are available.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CorePlatformServices
public CorePlatformServices()
-
-
Method Details
-
setServicesConfiguration
public static final void setServicesConfiguration(PlatformServicesConfiguration servicesConfiguration) throws ServiceException Specifies the services configuration that is to be used by this facade.- Parameters:
servicesConfiguration- The service configuration that is to be deployed. This configuration details the metadata source(s) describing service deployment(s).- Throws:
ServiceException- if an invalid configuration is specified.
-
setEnvironment
Specified the environment resources to be used by this facade.- Parameters:
environment- The environment resources that are to be used by the deployed services.
-
setJAASAppConfigurationEntry
public static final boolean setJAASAppConfigurationEntry(AppConfigurationEntry[] appConfigurationEntries) throws ServiceException Updates this resource environment to use the specified JAASentries.This method is a pass through method to
PlatformServices.setJAASAppConfigurationEntry(AppConfigurationEntry[]). Refer to its javadoc for additional details.- Parameters:
appConfigurationEntries- Array of JAAS application configurationentrieswhich the should be set in the resource environment.- Returns:
trueif the resourceenvironmentwas updated orfalseif a resource environment is not defined.- Throws:
ServiceException- if an exception is encountered.
-
startServices
Starts/looks up services by delegating the request to thePlatformServices.startServices()and then re-initializing handles to core platform services abstracted by this class.- Throws:
ServiceException- if unable to instantiate services.ServiceLookupFailedException- if an exception was encountered looking up remote services.
-
startLocalServices
Starts any services defined for local instantiation by delegating the request to thePlatformServices.startLocalServices()and then re-initializing handles to core platform services abstracted by this class.- Throws:
ServiceException
-
lookupRemoteServices
Locates any services defined for remote lookup by delegating the request to thePlatformServices.lookupRemoteServices()and then re-initializing handles to core platform services abstracted by this class. -
terminateServices
Terminates services by null'ing references to the core services and then delegating the service termination request to thePlatformServicesfacade.- Throws:
ServiceException- if unable to terminate services cleanly.
-
getDiscoveryService
Gets the discovery service.- Returns:
- Discovery service or
nullif a service is not available.
-
getInformationService
Gets the information service.- Returns:
- Information service or
nullif an information service is not available.
-
getSessionService
Gets the session service.- Returns:
- Session service or
nullif a session service is not available.
-
getUserService
Gets the user service.- Returns:
- User service or
nullif a user service is not available.
-
getAuthenticationService
Gets the authentication service.- Returns:
- Authentication service or
nullif an authentication service is not available.
-
addServicesDeploymentListener
public static final void addServicesDeploymentListener(ServicesDeploymentEventListenerInterface listener) throws ServiceException Adds a services deployment listener which is interested in being notified of deployment state transitions.Note that this method just delegates to {#link PlatformServices. addServicesDeploymentListener (ServicesDeploymentListenerInterface)}
- Parameters:
listener- Services deployment listener interested in being notified of deployment state changes.- Throws:
ServiceException- if unable to add the listener.
-
removeServicesDeploymentListener
public static final void removeServicesDeploymentListener(ServicesDeploymentEventListenerInterface listener) Removes a services deployment listener which is no longer interested in being notified of deployment state transitions.Note that this method just delegates to {#link PlatformServices. removeServicesDeploymentListener (ServicesDeploymentListenerInterface)}
- Parameters:
listener- Services deployment listener to be removed.
-
getServices
Gets all available services.- Returns:
- Foundation services that are available to this facade.
Each service in the collection will implement
RemoteServiceInterface. - Throws:
ServiceException- if unable to determine available services.
-
validateServices
Verify that the core services are available.- Authentication
- Information
- Session
- User
- Throws:
ServiceException- if a service is not available.
-
setDefaultServicesConfigurationWithMinimumLogging
Specifies the default SAS Foundation Services configuration with no LoggingService configuration.- Throws:
ServiceException- if unable to set the default configuration.
-
addContentServerRepository
Adds a repository definition to the running information service. Must be called after the services are started.- Parameters:
user- user context used to connect to the server and find the repository definition- Returns:
- true if repository definition was found and added
- Throws:
ServiceExceptionIllegalStateException- if services are not started
-
startAndConnect
public static SessionContextInterface startAndConnect(String clientApplication, ConnectionProfile connectionProfile) throws ServiceException - Throws:
ServiceException
-