com.sun.portal.wsrp.producer.registration.validator
Interface RegistrationValidator


public interface RegistrationValidator

RegistrationValidator is the SPI for registration validation in the WSRP producer.

This interface provides a method for acceping or denying a registration request based on the incoming registration data. The interface is implemented with whatever logic is appropriate for this task.

In the WSRP producer, registration is checked for validity when:

The implementation class name is taken from configuration of the producer instance (there is one RegistrationValidator implementation per producer instance).


Method Summary
 int validate(RegistrationData registrationData, ServiceDescription serviceDescription)
          Validate the registration.
 

Method Detail

validate

public int validate(RegistrationData registrationData,
                    ServiceDescription serviceDescription)
Validate the registration. This logic is used to determine if a registration is valid. The logic varies depending on the implementation of this interface.

Clients perform registration validation by passing in RegistrationData and ServiceDescription objects. Any data or functionality supplied by these object may be used to determine registration validity.

The return value of this method is a code indicating success or failure. Any non-negative code indicates success, any negative code indicates failure. The code can be used by clients as a key to a human-readable error message that matches the return code. Implementations of this interface should publicize the codes that may possibly be returned from the implementation of this method, and the semantics of the codes.

Parameters:
registrationData - a RegistrationData object that describes the registration to be validated
serviceDescription - a ServiceDescription object for the WSRP producer that is being registered into
Returns:
an int, the validation code. Any non-negative value indicates to clients that validation was successful. Any negative value indicates that validation failed.
See Also:
RegistrationData, ServiceDescription