net.larsan.urd.service.user
Class Service

java.lang.Object
  |
  +--net.larsan.urd.service.user.Service
All Implemented Interfaces:
Initializable, Service

public class Service
extends java.lang.Object
implements Service, Initializable

This is the main Urd user service. This service uses JAAS to authenticate its principals. To determine which JAAS login context to use, use the 'context' init parameter:

     
 
The login context default to 'SimpleUrdContext'. This service works with name and password callbacks fro ordinary authentications. For indirect authentications the login module must use an IndirectionCallback.

Available indirections can be registered with the service whrough the 'indirections' initiation parameter. This paramtere takes a comma separated value of class names for the indirections to use. For example:

     
 

This service is dependent on the Urd JNDI context and must have a context permission in order to use it.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
Service()
           
 
Method Summary
 void destroy()
          Destroy this service.
 ServiceHandle getServiceHandle()
          Get a reference to the ServiceHandle interface for this service.
 SoftwareInfo getServiceInfo()
          Get service information.
 void init(InitParameters param)
          Initialize module.
 void setStatusCallback(StatusCallback callback)
          Set the status callback this service should use to signal status changes to the framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
Method Detail

setStatusCallback

public void setStatusCallback(StatusCallback callback)
Description copied from interface: Service
Set the status callback this service should use to signal status changes to the framework. It is vital that the callback received by this method is used since a service is not available to the rest of the framework until it reports its status as ready.

Specified by:
setStatusCallback in interface Service
Parameters:
callback - Status callback handle

getServiceInfo

public SoftwareInfo getServiceInfo()
Description copied from interface: Service
Get service information. This method must never return null. This method is duplicated in the ServiceHandle interface.

Specified by:
getServiceInfo in interface Service
Returns:
A SoftwareInfo object, must never return null

getServiceHandle

public ServiceHandle getServiceHandle()
Description copied from interface: Service
Get a reference to the ServiceHandle interface for this service. The service handle is the public contract used by other services. This method is guarrantied by the framework never to be called unless the service returns its status as being ready.

Specified by:
getServiceHandle in interface Service
Returns:
A Service handle object, may return null if the service status is not ready

init

public void init(InitParameters param)
          throws UnavailableException
Description copied from interface: Initializable
Initialize module. The parameters passed in to this methods are thread safe and most probably immutable and defensivly copied.

Specified by:
init in interface Initializable
Parameters:
param - Initialization parameters
Throws:
UnavailableException - If initialization failed

destroy

public void destroy()
Description copied from interface: Initializable
Destroy this service. This is guarrantied to be the last method call by the framework on the service.

Specified by:
destroy in interface Initializable