public class BamMailService extends SimpleActor implements AlarmListener
Constructor and Description |
---|
BamMailService() |
Modifier and Type | Method and Description |
---|---|
void |
addTo(java.lang.String to)
Adds a 'to'
|
void |
close() |
void |
handleAlarm(Alarm alarm)
Handles a callback from an alarm.
|
void |
init() |
void |
message(java.lang.String to,
java.lang.String from,
java.io.Serializable value)
Sends to a mailbox
|
protected java.lang.String |
messageToText(java.io.Serializable value) |
void |
setDelayTime(Period period)
Sets the delay time, i.e.
|
void |
setMailSession(Session session)
Sets the mail session
|
void |
setProperties(java.util.Properties props)
Sets properties
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a property
|
void |
setSubject(java.lang.String subject)
Sets subject
|
getActor, getAddress, getBroker, getMailbox, getSender, setAddress, setBroker, setMailbox
isClosed, messageError, query, queryError, queryResult, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isClosed, messageError, query, queryError, queryResult
public void setDelayTime(Period period)
public void setMailSession(Session session)
public void setProperty(java.lang.String key, java.lang.String value)
public void setProperties(java.util.Properties props)
public void setSubject(java.lang.String subject)
public void addTo(java.lang.String to) throws AddressException
AddressException
@PostConstruct public void init()
public void message(java.lang.String to, java.lang.String from, java.io.Serializable value)
message
in interface MessageStream
message
in class AbstractMessageStream
to
- the target actor's addressfrom
- the source actor's addressvalue
- the message payloadprotected java.lang.String messageToText(java.io.Serializable value)
public void handleAlarm(Alarm alarm)
AlarmListener
handleAlarm
in interface AlarmListener
@PreDestroy public void close()