|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines a Reader service for receiving email from a server.
| Field Summary | |
static java.lang.String |
ROLEThe ROLE name used to acquire services that implement this service |
| Method Summary | |
void |
connect()Get the client in a state connected to the server so that it is ready to retrieve messages. |
void |
connect(java.lang.String host, java.lang.String user, java.lang.String password)Connect while overriding the user and password supplied by configuration Saying "connect(null, null, null)" is the same as "connect()" |
int |
count()Return a count of messages retrieved from the server. |
void |
disconnect()Close the client-server connection. |
java.lang.String[] |
getBcc(int msgIndex)Get the contents of the Bcc: header |
java.lang.String[] |
getCc(int msgIndex)Get the contents of the Cc: header |
java.lang.String |
getContentType(int msgIndex)Get the content of the ContentType header of a single-part message |
java.lang.String |
getContentType(int msgIndex, int partIndex)Get the content of the ContentType header of a part of a multi-part message |
java.lang.String |
getDisposition(int msgIndex)Get the content of the disposition header of a single-part message |
java.lang.String |
getDisposition(int msgIndex, int partIndex)Get the content of the disposition header of a part of a multi-part message |
java.io.File |
getFile(int msgIndex)Get the contents of a single-part message |
java.io.File |
getFile(int msgIndex, int partIndex)Get the contents of a particular part of a multi-part message |
java.lang.String |
getFileName(int msgIndex)Get the file name in the header of a single-part message |
java.lang.String |
getFileName(int msgIndex, int partIndex)Get the file name in the header of a part in the multi-part message |
java.lang.String[] |
getFrom(int msgIndex)Get the contents of the From: header |
java.util.Enumeration |
getHeaders(int msgIndex)Get all headers for a message |
java.lang.String |
getInline(int msgIndex)Get the content of an inline message |
int |
getLineCount(int msgIndex)Get the number of lines in a message (meaningless for multi-part messages) |
int |
getMultiPartCount(int msgIndex)Get the number of parts in a multi-part message |
java.lang.String[] |
getReplyTo(int msgIndex)Get the contents of the ReplyTo: header |
java.util.Date |
getSentDate(int msgIndex)Get the date a message was sent (Date header) |
int |
getSize(int msgIndex)Get the size of a message |
java.lang.String |
getSubject(int msgIndex)Get the subject header from a message |
java.lang.String[] |
getTo(int msgIndex)Get the contents of the To: header |
boolean |
isAnswered(int msgIndex)Check if this message has been marked as "answered" by a client |
boolean |
isDeleted(int msgIndex)Check if this message has been marked by a client as "deleted" or not |
boolean |
isDraft(int msgIndex)Check if this message has been marked by some client as "draft" or not |
boolean |
isFlagged(int msgIndex)Check if this message has been marked by a client as "flagged" |
boolean |
isInline(int msgIndex)Check if the message content is inline |
boolean |
isMultiPart(int msgIndex)Check if the message content is formatted as MIME multi-part |
boolean |
isRecent(int msgIndex)Check if this message is amrked by the server as "recent" or not |
boolean |
isSeen(int msgIndex)Check if this message has already been read or not |
boolean |
isSinglePart(int msgIndex)Check if the message content is formatted as MIME single-part |
void |
read()Retrieve all messages from the server |
void |
setAnswered(int msgIndex, boolean state)Mark a message as "answered" |
void |
setDeleted(int msgIndex, boolean state)Mark a message as "deleted" |
void |
setDraft(int msgIndex, boolean state)Mark a message as "draft |
void |
setFlagged(int msgIndex, boolean state)Mark a message as "flagged |
void |
setSeen(int msgIndex, boolean state)Mark a message as "read" |
| Field Detail |
public static final java.lang.String ROLE
| Method Detail |
public void connect()
throws NestedException
NestedException
public void connect(java.lang.String host,
java.lang.String user,
java.lang.String password)
throws NestedException
user - Username to use for connect - leave null to use configuration defaultspassword - Password to use to authenticate user - leave null to use configuration defaultNestedException - If the connect does not succeed
public void disconnect()
throws NestedException
NestedException
public void read()
throws NestedException
NestedExceptionpublic int count()
public int getSize(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public int getLineCount(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String getSubject(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.util.Date getSentDate(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String[] getTo(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String[] getFrom(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String[] getReplyTo(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String[] getCc(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String[] getBcc(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.util.Enumeration getHeaders(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public boolean isSeen(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public void setSeen(int msgIndex,
boolean state)
throws NestedException
msgIndex - A number from 0 to count()-1state - true=set, false=clearNestedException
public boolean isDeleted(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public void setDeleted(int msgIndex,
boolean state)
throws NestedException
msgIndex - A number from 0 to count()-1state - true=set, false=clearNestedException
public boolean isAnswered(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public void setAnswered(int msgIndex,
boolean state)
throws NestedException
msgIndex - A number from 0 to count()-1state - true=set, false=clearNestedException
public boolean isFlagged(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public void setFlagged(int msgIndex,
boolean state)
throws NestedException
msgIndex - A number from 0 to count()-1state - true=set, false=clearNestedException
public boolean isRecent(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public boolean isDraft(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public void setDraft(int msgIndex,
boolean state)
throws NestedException
msgIndex - A number from 0 to count()-1state - true=set, false=clearNestedException
public boolean isMultiPart(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public boolean isSinglePart(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public boolean isInline(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public int getMultiPartCount(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.io.File getFile(int msgIndex,
int partIndex)
throws NestedException
msgIndex - A number from 0 to count()-1partIndex - A number from 0 to getMultiPartCount()-1NestedException
public java.lang.String getFileName(int msgIndex,
int partIndex)
throws NestedException
msgIndex - A number from 0 to count()-1partIndex - A number from 0 to getMultiPartCount()-1NestedException
public java.lang.String getDisposition(int msgIndex,
int partIndex)
throws NestedException
msgIndex - A number from 0 to count()-1partIndex - A number from 0 to getMultiPartCount()-1NestedException
public java.lang.String getContentType(int msgIndex,
int partIndex)
throws NestedException
msgIndex - A number from 0 to count()-1partIndex - A number from 0 to getMultiPartCount()-1NestedException
public java.io.File getFile(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String getFileName(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String getDisposition(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String getContentType(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
public java.lang.String getInline(int msgIndex)
throws NestedException
msgIndex - A number from 0 to count()-1NestedException
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||