File 'net/pop3/client.cls' (part of 'Pool_Net')


Home | Packages | Files | Procedures | Classes | Keywords | External packages


Written by
Andreas Kupries
Description
Pop3 client core built upon the base connection management
See also
general POP3 background information, or POP3 client core for more specific info
Keywords
POP3, POP3 client

Class 'pop3Client'

Description
Full fledged POP3 client. The only parts not covered in this class are message classification and storage. These are delegated to external objects, see classificator and storage. A state machine is built on top of the low level methods in pop3Connection.
Superclasses
pop3Connection
Options
auth, classificator, done, on-connect, on-login, storage
Membervariables
after, cState, deleted, lock, pending, queue, retrieved, skip
Methods
ClearSocket, CloseDone, DeleDone, Goto, Init, InitScheduler, InitiateRecovery, Logon, Off, RetrDone, Schedule, Task, TopDone, WakeScheduler, msgDelete, msgIgnore, msgRetrieve, run

-auth
Defines the mode to use during login into the pop3 server, either 'apop' or 'user'. The latter uses USER/PASS to send the password in the clear, and is therefore less secure than APOP, which sends a hashvalue created from the timestamp used by the server to greet us and the password itself. On the other hand, every server has to support USER/PASS, APOP-support is optional.
-classificator
The name of the object handling the classification of incoming mails. Has to support the interface defined by popClientMsgClassificatorBase, i.e. its class should be derived from that class.
-done
The script evaluate after the connection was closed.
-on-connect
The script evaluate after a succesful connect.
-on-login
The script evaluate after a successful login.
-storage
The name of the object handling the storing of incoming mails. Has to support the interface defined by popClientStorageBase, i.e. its class should be derived from that class.

after
The id of the idle-handler used to schedule and execute the next task on the queue.
cState
The state of the finite automaton. Could not use 'state' as this is used by the base class to record the state of the last low-level operation.
deleted
A list containing the index numbers of the sucessfully deleted messages. Used during recovery to enforce the state of the server at the time of the loss of the connection.
lock
Activity flag. As long as it is true the system will ignore any attempt to start another session.
pending
The number of messages sent to the classificator we have no decision about (yet).
queue
A list of tasks to do, operated in a FIFO manner.
retrieved
A list containing the index numbers of the sucessfully state of the server at the time of the loss of the connection.
skip
The number of messages to skip during recovery.

ClearSocket ()

Closes the connection to the pop3 server described by this object.

CloseDone (seq)

Callback of standard shutdown. May restart the client, to proceed in error recovery.
Argument: seqHandle of the close sequencer created by Close.

DeleDone (seq)

Called after completion of a message deletion. Initiates emergency recovery in case of problems. Awakes the scheduler to start the next job.
Argument: seqHandle of the delete sequencer created by Dele.

Goto (newstate)

Jumps the client into the given state. Will behave like builtin 'return' in the calling procedure.
Argument: newstateThe state to jump to.

Init ()

(Re)Initializes the state of the finite automaton.

InitScheduler (seq)

Callback of 'login' operation. Initializes the scheduler task queue with header retrieval operations, then starts the real work.
Argument: seqHandle of the 'login' sequencer created by LoginUser (or LoginApop.

InitiateRecovery ()

Does everything required to recover from line or server problems. Things include: &p Execution of commit run to remove all messages which were already deleted and/or retrieved, but not committed by server. &p Skipping over messages making trouble multiple times.

Logon (seq)

Callback of 'open connection' operation. Initiates logon in case of sucess.
Argument: seqHandle of the 'open' sequencer created by Open.

Off (seq)

Callback of definite shutdown.
Argument: seqHandle of the close sequencer created by Close.

RetrDone (seq)

Called after completion of message retrieval. Initiates emergency recovery in case of problems. Awakes the scheduler to start the next job. The received information is given to the storage facility.
Argument: seqHandle of the delete sequencer created by Retr.

Schedule ()

The scheduler. Executed semi-periodically to launch the tasks waiting in the internal queue. Automatically injects a connection shutdown in case of nothing more waiting to be done.

Task (task)

Adds a new task to the scheduler queue, starts the scheduler, if necessary. Deletions are added to the front, to give them priority.
Argument: taskText describing a task to be done by the client

TopDone (seq)

Called after completion of a header retrieval. Initiates emergency recovery in case of problems. The received information is given to the classificator for determination of further action. Awakes the scheduler to start the next job.
Argument: seqHandle of the top sequencer created by Top

WakeScheduler ()

Starts the scheduler, if not already waiting for execution.

msgDelete (msg)

Classificator callback. The specified message shall be deleted at the server, without retrieval.
Argument: msgId of the message to delete.

msgIgnore (msg)

Classificator callback. The specified message shall be neither deleted nor retrieved. It will sit in the server awaiting action of the user.
Argument: msgId of the message to ignore.

msgRetrieve (msg)

Classificator callback. The specified message shall be retrieved from the server.
Argument: msgId of the message to retrieve.

run ()

Starts a retrieval cycle of the specified client.


Generated by AutoDoc 2.1 at 02/20/1999, invoked by Andreas Kupries