|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.figure8.join.services.notification.SubscribersNotifierAdapterSupport org.figure8.join.services.notification.SubscribersNotifierJMSAdapter
public abstract class SubscribersNotifierJMSAdapter
This is a base class for JMS consumers that wants to notify subscribers
when a new message arrive. It acts as an adapter between the JMS world
and the SubscribersNotifier
facilities.
This class is a JMSConsumerBean that is Configurable
:
it defines a mandatory parameter that should be a PropertiesExtractor
impl.
This extractor help the transition from a JMS view (that is object message
based) to a notification content view (a template with curly braced varaibles representing
object properties).
Extensions of this class should specifiy which SubscribersNotifier implementation
to use when running scripts.
Configurable
,
JMSConsumerBean
,
PropertiesExtractor
Field Summary | |
---|---|
protected static ParameterDefinition |
extractionParam
ParameterDefinition representation of parameter denoting the propertiesExtractor to use. |
static java.lang.String |
EXTRACTOR_PARAM
Name of configurable parameter denoting the propertiesExtractor to use for getting props. |
protected static java.util.List |
parameters
List of ParameterDefinition s supported by this adapter |
static java.lang.String |
RESOURCE_PROP_PARAM
Name of configurable parameter denoting the object property representing the key of resource to notify event for |
protected static ParameterDefinition |
resourcePropParam
ParameterDefinition representation of parameter denoting the key of resource to notify event for. |
Fields inherited from class org.figure8.join.services.notification.SubscribersNotifierAdapterSupport |
---|
EVENT_PARAM, eventParam, name, RESOURCE_PARAM, resourceParam |
Constructor Summary | |
---|---|
SubscribersNotifierJMSAdapter()
|
Method Summary | |
---|---|
java.util.List |
getParameterDefinitionsAsList()
Get this object parameters definitions as a list |
void |
onMessage(javax.jms.Message message)
This method is executed on message delivery. |
void |
setParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Set the value of a parameter using its name |
void |
setPropertiesExtractorClass(java.lang.String extractorClass)
Specify the class of PropertiesExtractor implementation to use |
void |
setResourceProperty(java.lang.String resourceProperty)
|
void |
stop()
Implement this method to stop current process and free resources. |
Methods inherited from class org.figure8.join.services.notification.SubscribersNotifierAdapterSupport |
---|
getEventKey, getName, getParameterDefinitions, getResourceKey, getSubscribersNotifier, retrieveMailingList, retrieveReportingService, retrieveSubscribers, setEventKey, setName, setParameter, setParameters, setResourceKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.figure8.join.core.messaging.JMSConsumerBean |
---|
getName, setName |
Field Detail |
---|
public static final java.lang.String RESOURCE_PROP_PARAM
public static final java.lang.String EXTRACTOR_PARAM
protected static java.util.List parameters
ParameterDefinition
s supported by this adapter
protected static final ParameterDefinition resourcePropParam
protected static final ParameterDefinition extractionParam
Constructor Detail |
---|
public SubscribersNotifierJMSAdapter()
Method Detail |
---|
public void setResourceProperty(java.lang.String resourceProperty)
resourceProperty
- Property representing resourcepublic void setPropertiesExtractorClass(java.lang.String extractorClass) throws InvalidParameterException
extractorClass
- The FQN of Java class representing PropertiesExtractor impl
InvalidParameterException
- if extractorClass is not found or does
not implement the PropertiesExtractor interfacepublic void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
message
- public void stop()
stop
in interface JMSConsumerBean
public java.util.List getParameterDefinitionsAsList()
getParameterDefinitionsAsList
in interface Configurable
getParameterDefinitionsAsList
in class SubscribersNotifierAdapterSupport
ParameterDefinition
objectspublic void setParameter(java.lang.String parameterName, java.lang.String parameterValue) throws InvalidParameterException
setParameter
in interface Configurable
setParameter
in class SubscribersNotifierAdapterSupport
parameterName
- The name of parameter so set value forparameterValue
- The value of the paramater
InvalidParameterException
- if this parameter is not supported by this object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |