|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ninecode.email.beans.slave.Robot
Message driven bean base class to handle web requests.
The Robot class gathers together the common functionality required
of a message driven bean leaving only the onMessage()
method to be provided in subclasses.
Constructor Summary | |
Robot()
Construct a Robot. |
Method Summary | |
void |
ejbCreate()
Startup call. |
void |
ejbRemove()
Shutdown call. |
abstract void |
onMessage(Message message)
Process a message. |
void |
replyMessage(Message message,
String subject,
String contents)
Reply to a message. |
void |
setMessageDrivenContext(MessageDrivenContext mdc)
Remember the context for this instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Robot()
Method Detail |
public void ejbCreate() throws CreateException
CreateException
- If there was a problem initializing.public void replyMessage(Message message, String subject, String contents) throws NamingException, JMSException
jms/Outbox
queue.
Usually used to respond to an onMessage()
call that is
passed a message containing a ReplyTo
property where
the content of the message is trivial (no mime attachments etc.).
message
- The message to reply to.
The ReplyTo address (property) from this message is used to set the
message To address (property).subject
- The reply message subject.contents
- The reply message contents.
NamingException
JMSException
public void ejbRemove() throws EJBException
ejbRemove
in interface MessageDrivenBean
EJBException
- If there was a problem gracefully shutting down.public void setMessageDrivenContext(MessageDrivenContext mdc) throws EJBException
setMessageDrivenContext
in interface MessageDrivenBean
mdc
- The context to be remembered.
EJBException
- If some problem with setting
the context was encountered. Not used.public abstract void onMessage(Message message)
onMessage
in interface MessageListener
message
- The message to process.
This bytes message should have the following string properties:
replyMessage(javax.jms.Message, java.lang.String, java.lang.String)
|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |