|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.ogsadai.client.toolkit.activity.BaseActivity
uk.org.ogsadai.client.toolkit.activities.delivery.DeliverToSMTP
public class DeliverToSMTP
An activity that delivers data as e-mails sent via an SMTP server.
Activity inputs:
from. Type: String. Sender e-mail address.
to. Type: OGSA-DAI list of String. List
of recipient e-mail addresses.
subject. Type: String. E-mail subject line
data. Type: One of
OGSA-DAI list of char[],
OGSA-DAI list of byte[],
Clob, or
Blob.
The data that will form the body of the e-mail. If the input contains byte
rather than character data then the bytes are converted to characters using
UTF-8 encoding.
Activity outputs: none.
Expected name of activity on server:
uk.org.ogsadai.DeliverToSMTP
Activity input/output ordering:
from, to, and subject inputs are
read first and then the data input is read and streamed to the
SMTP server.
Activity contracts: none.
Target data resource: none.
Behaviour:
byte[] or Blob) then UTF-8 encoding is assumed.
| Field Summary | |
|---|---|
static int |
BLOCK_SIZE
Block size for sending the blocks. |
static ActivityName |
DEFAULT_ACTIVITY_NAME
Default activity name. |
static java.lang.String |
INPUT_DATA
Activity output name - the data to delivered through SMTP. |
static java.lang.String |
INPUT_FROM
Activity input name - from. |
static java.lang.String |
INPUT_SUBJECT
Activity input name - subject. |
static java.lang.String |
INPUT_TO
Activity input name - to. |
| Constructor Summary | |
|---|---|
DeliverToSMTP()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addData(java.io.Reader data)
Add data to the corresponding input. |
void |
addFrom(java.lang.String from)
Adds the sender to the corresponding input. |
void |
addSubject(java.lang.String subject)
Adds subject to the corresponding input. |
void |
addTo(java.util.Iterator to)
Add the recipient(s) to the corresponding input. |
void |
addTo(java.lang.String[] to)
Add the recipient(s) to the corresponding input. |
void |
connectDataInput(SingleActivityOutput output)
Connects the input to the given output. |
void |
connectFromInput(SingleActivityOutput output)
Connects the input to the given output. |
void |
connectSubjectInput(SingleActivityOutput output)
Connects the input to the given output. |
void |
connectToInput(SingleActivityOutput output)
Connects the input to the given output. |
protected ActivityInput[] |
getInputs()
Gets the inputs associated with the activity. |
protected ActivityOutput[] |
getOutputs()
Gets the outputs associated with the activity. |
protected void |
validateIOState()
Validates the state of the activity inputs and outputs. |
| Methods inherited from class uk.org.ogsadai.client.toolkit.activity.BaseActivity |
|---|
buildRequest, getActivityName, getConnectedOutputs, getErrorMessages, getInputDescriptors, getInstanceName, getRequestAndStatusHandler, getServer, getStatus, getWarnings, hasErrorMessages, hasWarnings, processRequestStatus, setActivityName, setServer, toString, validateState, writeToString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface uk.org.ogsadai.client.toolkit.Activity |
|---|
getActivityName, getErrorMessages, getInstanceName, getRequestAndStatusHandler, getStatus, getWarnings, hasErrorMessages, hasWarnings, setActivityName |
| Field Detail |
|---|
public static final ActivityName DEFAULT_ACTIVITY_NAME
public static final java.lang.String INPUT_TO
public static final java.lang.String INPUT_FROM
public static final java.lang.String INPUT_SUBJECT
public static final java.lang.String INPUT_DATA
public static final int BLOCK_SIZE
| Constructor Detail |
|---|
public DeliverToSMTP()
| Method Detail |
|---|
public void addTo(java.util.Iterator to)
to - the recipient(s) to add.public void addTo(java.lang.String[] to)
to - the recipient(s) to add.public void addFrom(java.lang.String from)
from - sender to add.public void addSubject(java.lang.String subject)
subject - subject to add.
public void addData(java.io.Reader data)
throws java.io.IOException
data - data to be delivered
java.io.IOException - in case an exception is encountered while
reading from the Reader.public void connectToInput(SingleActivityOutput output)
output - output to connect to.public void connectFromInput(SingleActivityOutput output)
output - output to connect to.public void connectSubjectInput(SingleActivityOutput output)
output - output to connect to.public void connectDataInput(SingleActivityOutput output)
output - output to connect to.
protected void validateIOState()
throws ActivityIOIllegalStateException
validateIOState in class BaseActivityActivityIOIllegalStateException - if an activity input is not in a valid state.protected ActivityInput[] getInputs()
getInputs in class BaseActivityprotected ActivityOutput[] getOutputs()
getOutputs in class BaseActivity
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||