|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RegistrationPolicy
An interface allowing users of the Registration service to customize different aspects of how Consumers are handled. Methods of this interface are used by RegistrationManager to make appropriate decisions. Implementations of this interface MUST provide a no-argument constructor for instantiation from the class name.
Method Summary | |
---|---|
java.lang.String |
createRegistrationHandleFor(java.lang.String registrationId)
Generates a registration handle based on the database identity of the Registration. |
java.lang.String |
getAutomaticGroupNameFor(java.lang.String consumerName)
Determines the ConsumerGroup name to which the Consumer associated with the specified name should be assigned with or null if the Consumer should not be automatically assigned to a ConsumerGroup. |
java.lang.String |
getConsumerIdFrom(java.lang.String consumerName,
java.util.Map registrationProperties)
Obtains a consumer identity which uniquely identifies a Consumer in function of the consumer name and registration properties. |
RegistrationManager |
getManager()
Retrieves the RegistrationManager with which this RegistrationPolicy is associated. |
void |
setExpectations(java.util.Map<javax.xml.namespace.QName,? extends PropertyDescription> registrationPropertyDescriptions)
Define what the expectations are as far as acceptable registration properties go. |
void |
setManager(RegistrationManager manager)
Associates this RegistrationPolicy with the specified RegistrationManager. |
void |
validateConsumerGroupName(java.lang.String groupName)
Determines if the specified ConsumerGroup name is acceptable. |
void |
validateConsumerName(java.lang.String consumerName)
Determines if the specified Consumer name is acceptable. |
void |
validateRegistrationDataFor(java.util.Map registrationProperties,
java.lang.String consumerIdentity)
Examines and determines whether the given registration properties are adequate for the Consumer associated with the given identity. |
Method Detail |
---|
void validateRegistrationDataFor(java.util.Map registrationProperties, java.lang.String consumerIdentity) throws java.lang.IllegalArgumentException, RegistrationException
registrationProperties
- a Map containing the registration properties in the form of property name (QName) -
property value (Object) mappingsconsumerIdentity
- the Consumer identity (as returned by getConsumerIdFrom(String,
java.util.Map)
) for which the registration properties must be ascertained
java.lang.IllegalArgumentException
- if any of the registration properties is invalid for the specified Consumer
RegistrationException
- if an exception occured in the registration servicejava.lang.String createRegistrationHandleFor(java.lang.String registrationId) throws java.lang.IllegalArgumentException
registrationId
- the database identity of the Registration for which a handle is required.
java.lang.IllegalArgumentException
- if the specified registration identity if null
or emptyjava.lang.String getAutomaticGroupNameFor(java.lang.String consumerName) throws java.lang.IllegalArgumentException
null
if the Consumer should not be automatically assigned to a ConsumerGroup. This method is
called during the Consumer creation process to see if the Consumer should be automatically added to a
ConsumerGroup.
consumerName
- the name of the Consumer being created
null
if the
Consumer will not be automatically to a ConsumerGroup at creation
java.lang.IllegalArgumentException
- if the specified Consumer name if null
or emptyjava.lang.String getConsumerIdFrom(java.lang.String consumerName, java.util.Map registrationProperties) throws java.lang.IllegalArgumentException, InvalidConsumerDataException
consumerName
- the consumer nameregistrationProperties
- a Map containing the registration properties in the form of property name (QName) -
property value (Object) mappings. Producer implementations might use the
registration properties to provide secure Consumer identity.
InvalidConsumerDataException
- if the Policy examines the specified registration properties to determine the
Consumer identity and decides that they are not in a proper state
java.lang.IllegalArgumentException
- if the specified Consumer name if null
or emptyvoid validateConsumerName(java.lang.String consumerName) throws java.lang.IllegalArgumentException, RegistrationException
consumerName
- the name of the Consumer as passed during the registration process
java.lang.IllegalArgumentException
- if the specified Consumer name if null
or empty
RegistrationException
- if an exception occurred in the Registration servicevoid validateConsumerGroupName(java.lang.String groupName) throws java.lang.IllegalArgumentException, RegistrationException
groupName
- the name of the ConsumerGroup to be created
java.lang.IllegalArgumentException
- if the specified ConsumerGroup name if null
or empty
RegistrationException
- if an exception occurred in the Registration serviceRegistrationManager getManager()
void setManager(RegistrationManager manager)
manager
- the RegistrationManager with which this RegistrationPolicy should be associated.void setExpectations(java.util.Map<javax.xml.namespace.QName,? extends PropertyDescription> registrationPropertyDescriptions)
registrationPropertyDescriptions
- a map of containing the description of expected registrations
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |