Class OMAGServerServiceInstanceHandler
java.lang.Object
org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
- Direct Known Subclasses:
AuditableServerServiceInstanceHandler
OMAGServerServiceInstanceHandler retrieves information from the instance map for
an OMAG server service instance. The instance map is thread-safe. Instances are added
and removed during server initialization and termination.
-
Constructor Summary
ConstructorsConstructorDescriptionOMAGServerServiceInstanceHandler(String serviceName) Constructor passes the service name that is used on all calls to this instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifiergetServerSecurityVerifier(String userId, String serverName) Return the security verifier for the server.Return the service's official namebooleanisServerActive(String userId, String serverName) Return whether a particular server is registered with the platform.voidremoveServerServiceInstance(String serverName) Remove the instance for this server.
-
Constructor Details
-
OMAGServerServiceInstanceHandler
Constructor passes the service name that is used on all calls to this instance.- Parameters:
serviceName- unique identifier for this service with a human meaningful value
-
-
Method Details
-
getServiceName
Return the service's official name- Returns:
- String name
-
isServerActive
public boolean isServerActive(String userId, String serverName) throws org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException Return whether a particular server is registered with the platform. This is used by the admin services when finding no instance is not an error.- Parameters:
userId- calling user or null if it is an anonymous requestserverName- name of the server- Returns:
- boolean
- Throws:
org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException- the user is not authorized to issue the request.
-
getServerSecurityVerifier
public org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier getServerSecurityVerifier(String userId, String serverName) throws org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException Return the security verifier for the server.- Parameters:
userId- calling user or null if it is an anonymous requestserverName- name of the server- Returns:
- OpenMetadataServerSecurityVerifier object - never null
- Throws:
org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException- the server name is not known
-
removeServerServiceInstance
Remove the instance for this server.- Parameters:
serverName- name of the server
-