|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.xbus.technical.mail.POP3XMLReceiver
public class POP3XMLReceiver
TODO Kommentierung
When the POP3XMLReceiver
receives a request it reads the
emails into a String and calls the application layer.
Field Summary | |
---|---|
protected javax.mail.Folder |
mFolder
|
protected javax.mail.Message |
mMessage
|
Constructor Summary | |
---|---|
POP3XMLReceiver()
|
Method Summary | |
---|---|
void |
close()
This method will close the connection with the POP3 server |
protected void |
closeFolder()
|
void |
commit()
Implemented method commit from TAResource interface. |
void |
deleteMail()
Do the action of deleting the message from the pop3 inbox account |
protected boolean |
doReceive(XBUSSystem xbusSystem)
|
protected java.lang.String |
getAddress()
|
java.lang.String |
getOnError()
Returns the onError. |
protected java.lang.Object |
getRequestContent(java.lang.String system)
getRequestContent delivers the content of the request. |
protected java.lang.String |
getReturncode()
|
java.lang.String |
getType()
A Receiver can receive data either as a
String or as an Object from a neighboring
system. |
void |
open()
This method will open the connection with the POP3 server |
protected void |
readConfiguration(java.lang.String system)
Reads standard configuration and stores follow data in the class variables: Host
specified the host address of the POP3 account
Username
specified the useraname of the POP3 account
Password
specified the passowrd of the POP3 account
|
void |
receive(java.lang.String systemName)
This method will open the Transaction manager for this ressource adb use the doReceive(XBUSSystem) method to process the reading |
void |
rollback()
Implemented method rollback from TAResource ignores all
changes have made since the beginning of the process (transaction). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.mail.Folder mFolder
protected javax.mail.Message mMessage
Constructor Detail |
---|
public POP3XMLReceiver()
Method Detail |
---|
public void receive(java.lang.String systemName)
doReceive(XBUSSystem)
method to process the reading
receive
in interface ReceiverSingleInterface
systemName
- name of the interface definition
XException
- if something goes wrongXBUSSystem.getSystems(String, String)
protected boolean doReceive(XBUSSystem xbusSystem)
protected java.lang.Object getRequestContent(java.lang.String system) throws XException
getRequestContent
delivers the content of the request.
Subclasses may define their own request content.
String
but casted to
Object
for compliance reasons
XException
public void commit() throws XException
commit
from TAResource interface. The
purpose of commit actions is to remove any backup information that had
been created during process(tansaction).
Depending on the FinalResolution, the following acts commit all actions.
Resolution | Acts |
---|---|
Preserve | delete copy file |
Delete | 1. delete the email |
commit
in interface TAResource
XException
- if any error occursTAResource.commit()
public void rollback() throws XException
rollback
from TAResource ignores all
changes have made since the beginning of the process (transaction).
Depending on the FinalResolution, the following acts roll back all modifications that have been made in the file system:
Resolution | Acts |
---|---|
Delete |
rollback
in interface TAResource
XException
- if any error occursTAResource.rollback()
public void open() throws XException
open
in interface TAResource
XException
- if something goes wrongpublic void close() throws XException
close
in interface TAResource
XException
- if something goes wrongpublic java.lang.String getOnError()
public void deleteMail() throws XException
XException
public java.lang.String getType()
Receiver
Receiver
can receive data either as a
String
or as an Object
from a neighboring
system.Strings
, getType
returns Constants.TYPE_TEXT
Objects
, getType
returns Constants.TYPE_OBJECT
getType
in interface Receiver
protected void readConfiguration(java.lang.String system) throws XException
Host |
specified the host address of the POP3 account | |
Username |
specified the useraname of the POP3 account | |
Password |
specified the passowrd of the POP3 account |
system
- name of the interface definition
XException
- if something goes wrongprotected void closeFolder() throws XException
XException
protected java.lang.String getAddress()
protected java.lang.String getReturncode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |