|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.net.SocketClient
org.apache.commons.net.imap.IMAP
org.apache.commons.net.imap.IMAPClient
public class IMAPClient
The IMAPClient class provides the basic functionalities found in an IMAP client.
| Nested Class Summary | |
|---|---|
static class |
IMAPClient.FETCH_ITEM_NAMES
The message data item names for the FETCH command defined in RFC 3501. |
static class |
IMAPClient.SEARCH_CRITERIA
The search criteria defined in RFC 3501. |
static class |
IMAPClient.STATUS_DATA_ITEMS
The status data items defined in RFC 3501. |
| Nested classes/interfaces inherited from class org.apache.commons.net.imap.IMAP |
|---|
IMAP.IMAPState |
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.net.imap.IMAP |
|---|
__DEFAULT_ENCODING, __writer, _reader, DEFAULT_PORT |
| Fields inherited from class org.apache.commons.net.SocketClient |
|---|
_defaultPort_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL |
| Constructor Summary | |
|---|---|
IMAPClient()
|
|
| Method Summary | |
|---|---|
boolean |
append(String mailboxName)
Send an APPEND command to the server. |
boolean |
append(String mailboxName,
String flags,
String datetime)
Send an APPEND command to the server. |
boolean |
capability()
Send a CAPABILITY command to the server. |
boolean |
check()
Send a CHECK command to the server. |
boolean |
close()
Send a CLOSE command to the server. |
boolean |
copy(String sequenceSet,
String mailboxName)
Send a COPY command to the server. |
boolean |
create(String mailboxName)
Send a CREATE command to the server. |
boolean |
delete(String mailboxName)
Send a DELETE command to the server. |
boolean |
examine(String mailboxName)
Send an EXAMINE command to the server. |
boolean |
expunge()
Send an EXPUNGE command to the server. |
boolean |
fetch(String sequenceSet,
String itemNames)
Send a FETCH command to the server. |
boolean |
list(String refName,
String mailboxName)
Send a LIST command to the server. |
boolean |
login(String username,
String password)
Login to the IMAP server with the given username and password. |
boolean |
logout()
Send a LOGOUT command to the server. |
boolean |
lsub(String refName,
String mailboxName)
Send an LSUB command to the server. |
boolean |
noop()
Send a NOOP command to the server. |
boolean |
rename(String oldMailboxName,
String newMailboxName)
Send a RENAME command to the server. |
boolean |
search(String criteria)
Send a SEARCH command to the server. |
boolean |
search(String charset,
String criteria)
Send a SEARCH command to the server. |
boolean |
select(String mailboxName)
Send a SELECT command to the server. |
boolean |
status(String mailboxName,
String[] itemNames)
Send a STATUS command to the server. |
boolean |
store(String sequenceSet,
String itemNames,
String itemValues)
Send a STORE command to the server. |
boolean |
subscribe(String mailboxName)
Send a SUBSCRIBE command to the server. |
boolean |
uid(String command,
String commandArgs)
Send a UID command to the server. |
boolean |
unsubscribe(String mailboxName)
Send a UNSUBSCRIBE command to the server. |
| Methods inherited from class org.apache.commons.net.imap.IMAP |
|---|
_connectAction_, disconnect, doCommand, doCommand, generateCommandID, getReplyString, getReplyStrings, getState, sendCommand, sendCommand, sendCommand, sendCommand, sendData, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IMAPClient()
| Method Detail |
|---|
public boolean capability()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs
public boolean noop()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean logout()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean login(String username,
String password)
throws IOException
connect
before attempting to login. A login attempt is only valid if
the client is in the NOT_AUTH_STATE.
After logging in, the client enters the AUTH_STATE.
username - The account name being logged in to.password - The plain text password of the account.
IOException - If a network I/O error occurs in the process of
logging in.
public boolean select(String mailboxName)
throws IOException
mailboxName - The mailbox name to select.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean examine(String mailboxName)
throws IOException
mailboxName - The mailbox name to examine.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean create(String mailboxName)
throws IOException
mailboxName - The mailbox name to create.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean delete(String mailboxName)
throws IOException
mailboxName - The mailbox name to delete.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean rename(String oldMailboxName,
String newMailboxName)
throws IOException
oldMailboxName - The existing mailbox name to rename.newMailboxName - The new mailbox name.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean subscribe(String mailboxName)
throws IOException
mailboxName - The mailbox name to subscribe to.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean unsubscribe(String mailboxName)
throws IOException
mailboxName - The mailbox name to unsubscribe from.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean list(String refName,
String mailboxName)
throws IOException
refName - The reference name.mailboxName - The mailbox name.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean lsub(String refName,
String mailboxName)
throws IOException
refName - The reference name.mailboxName - The mailbox name.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean status(String mailboxName,
String[] itemNames)
throws IOException
mailboxName - The reference name.itemNames - The status data item names.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean append(String mailboxName,
String flags,
String datetime)
throws IOException
mailboxName - The mailbox name.flags - The flag parenthesized list (optional).datetime - The date/time string (optional).
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean append(String mailboxName)
throws IOException
mailboxName - The mailbox name.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean check()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean close()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean expunge()
throws IOException
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean search(String charset,
String criteria)
throws IOException
charset - The charset (optional).criteria - The search criteria.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean search(String criteria)
throws IOException
criteria - The search criteria.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean fetch(String sequenceSet,
String itemNames)
throws IOException
sequenceSet - The sequence set to fetch.itemNames - The item names for the FETCH command.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean store(String sequenceSet,
String itemNames,
String itemValues)
throws IOException
sequenceSet - The sequence set to store.itemNames - The item names for the STORE command.itemValues - The item values for the STORE command.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean copy(String sequenceSet,
String mailboxName)
throws IOException
sequenceSet - The sequence set to fetch.mailboxName - The mailbox name.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
public boolean uid(String command,
String commandArgs)
throws IOException
command - The command for UID.commandArgs - The arguments for the command.
true if the command was successful,false if not.
IOException - If a network I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||