Class OMAGServerServiceInstanceHandler

  • Direct Known Subclasses:
    AuditableServerServiceInstanceHandler

    public abstract class OMAGServerServiceInstanceHandler
    extends Object
    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 Detail

      • OMAGServerServiceInstanceHandler

        public OMAGServerServiceInstanceHandler​(String serviceName)
        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 Detail

      • getServiceName

        public String getServiceName()
        Return the service's official name
        Returns:
        String name
      • isServerActive

        public boolean isServerActive​(String userId,
                                      String serverName)
                               throws 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 request
        serverName - name of the server
        Returns:
        boolean
        Throws:
        UserNotAuthorizedException - the user is not authorized to issue the request.
      • removeServerServiceInstance

        public void removeServerServiceInstance​(String serverName)
        Remove the instance for this server.
        Parameters:
        serverName - name of the server