com.ibm.presence.api.authorization
Class AuthorizationServiceManager

java.lang.Object
  extended by com.ibm.presence.api.authorization.AuthorizationServiceManager

public class AuthorizationServiceManager
extends java.lang.Object

This class is a POJO wrapper that used by an authorization service to register/unregister to the presence server. It is implemented as a singleton that ensures one instance of this class. Once an authorization service is registered, the presence server will invoke its methods for getting authorization rules.


Field Summary
private static javax.naming.Context _ctx
          JNDI initial context
private static AuthorizationServiceManager _instance
          Singleton instance
private static java.util.logging.Logger _logger
          Logger for authorization service messages
private static java.lang.String REGISTER_AUTHORIZATION_SERVICE_JNDI_NAME
          A JNDI name for EJB that the manager wraps
 
Constructor Summary
AuthorizationServiceManager()
          Constructs a singleton instance of this class (the code implementation prevents multiple instances)
 
Method Summary
private  com.ibm.presence.api.authorization.RegisterAuthorizationService getRegisterAuthorizationService()
          Returns a RegisterAuthorizationService bean that this class wraps
static AuthorizationServiceManager instance()
          Returns an instance of this AuthorizationService manager
 int registerAuthorizationService(AuthorizationServiceData data)
          Registers an authorization service.
 int unregisterAuthorizationService(AuthorizationServiceData data)
          Unregister an authorization service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

private static final java.util.logging.Logger _logger
Logger for authorization service messages


_instance

private static final AuthorizationServiceManager _instance
Singleton instance


REGISTER_AUTHORIZATION_SERVICE_JNDI_NAME

private static final java.lang.String REGISTER_AUTHORIZATION_SERVICE_JNDI_NAME
A JNDI name for EJB that the manager wraps

See Also:
Constant Field Values

_ctx

private static javax.naming.Context _ctx
JNDI initial context

Constructor Detail

AuthorizationServiceManager

public AuthorizationServiceManager()
Constructs a singleton instance of this class (the code implementation prevents multiple instances)

Method Detail

instance

public static AuthorizationServiceManager instance()
Returns an instance of this AuthorizationService manager

Returns:
An instance of this AuthorizationService manager

getRegisterAuthorizationService

private com.ibm.presence.api.authorization.RegisterAuthorizationService getRegisterAuthorizationService()
Returns a RegisterAuthorizationService bean that this class wraps

Returns:
RegisterAuthorizationService

registerAuthorizationService

public int registerAuthorizationService(AuthorizationServiceData data)
                                 throws com.ibm.presence.api.exceptions.DataLayerException
Registers an authorization service. The implementation invokes the RegisterAuthorizationService bean to proceed this request.

Parameters:
data - includes an AuthorizationService object to register
Returns:
result code indicates whether the registration is succeeded or not @see AuthorizationErrorCodes
Throws:
com.ibm.presence.api.exceptions.DataLayerException

unregisterAuthorizationService

public int unregisterAuthorizationService(AuthorizationServiceData data)
Unregister an authorization service. The implementation invokes the RegisterAuthorizationService bean to proceed this request.

Parameters:
data - includes an AuthorizationService object to unregister
Returns:
result code indicates whether the registration is succeeded or not @see AuthorizationErrorCodes


Copyright © 2003 IBM Corp. All Rights Reserved.