Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ematgine.threads.admin
Class S13_mail_reader  view S13_mail_reader download S13_mail_reader.java

java.lang.Object
  extended byorg.ematgine.threads.ematgine_thread
      extended byorg.ematgine.threads.ematgine_service
          extended byorg.ematgine.threads.admin.S13_mail_reader
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.lang.Runnable

public class S13_mail_reader
extends org.ematgine.threads.ematgine_service

This class implements the thread in charge of corresponding with the email server in order to treat requests sent by mail by eMATgine server's users..


Field Summary
(package private)  java.util.Vector allmessages
          all messages in the mail boxes
(package private)  java.lang.String host
          mail host to connect to
(package private)  java.lang.String password
          mail user password
(package private)  org.ematgine.utils.javamail.input.InputJavamail pop3
          POP3 object to perform connections with the mail server
(package private)  java.lang.String username
          mail user login
 
Fields inherited from class org.ematgine.threads.ematgine_service
eMATgineServerHomeDirectory, internal_communication_channels, service_configuration
 
Fields inherited from class org.ematgine.threads.ematgine_thread
internal_requests, killed, PDU_number, queues, runner, semaphores, stopped, sub_thread_name, the_thread, thread_name
 
Constructor Summary
S13_mail_reader()
          Constructor for the S13_mail_reader object
S13_mail_reader(java.lang.String Sservice_number, java.util.Hashtable queueParams, java.util.Hashtable semaphoreParams)
          Constructor that downloads the server configuration from the database
 
Method Summary
private  boolean analyse_PDU(java.util.Vector all_pdu)
          analyse the received PDUs
private  void definePOP3ServerConfiguration()
           
private  boolean getNewMessages()
          get the new and unread messages
private  org.ematgine.utils.requests.PDU_request getNewMessagesRsp(org.ematgine.utils.requests.PDU_request received_pdu)
          define the PDU response for S13_GET_NEW_MESSAGES
private  boolean retrieveMessageFromPOP3Server()
          Get the information on the messages and retrieve the content of each message.
 void run()
          Main processing method for the S13_mail_reader object
private  java.lang.String suppress_caracter(java.lang.String the_string_to_modified, java.lang.String the_string_to_suppress)
          There can't be any " caracter in a mysql database
 
Methods inherited from class org.ematgine.threads.ematgine_service
add_internal_communication_channel, add_subtreatment_thread, analyseRequestField, further_PDU_analyse, get_internal_communication_channel, get_service_configuration_req, get_subtreatment_thread, remove_internal_communication_channel, send_get_user_by_email_address_req, send_get_user_by_login, send_Get_User_Request, send_Service_user_login_request, send_Store_User_Request, send_Subscribe_User_Request, set_user, wait_for_service_configuration
 
Methods inherited from class org.ematgine.threads.ematgine_thread
acquire_semaphore, actionPerformed, addWaitingPDU, attempt_semaphore, display_hashtable, displayQueuesSize, get_date_toString, get_PDU, get_several_PDU, get_sub_thread_name, get_thread_name, getWaitingPDU, increment_PDU_number, internalService_addPDURequest, internalService_getPDURequest, internalService_PDURequest_size, isAwaited, numberOfWaitingPDU, poll_PDU, print_screen, println_access_log, println_access_log, println_error_log, println_error_log, println_pdu_log, println_screen, println_screen, release_semaphore, removeWaitingPDU, send_PDU_mail_with_filenames, send_PDU_mail_with_html_files, send_PDU_mail_with_part_of_file, send_PDU_without_polling, send_PDU, send_PDU, send_PDU, send_waiting_PDU, set_priority, set_sub_thread_name, set_thread_name, sleep, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pop3

org.ematgine.utils.javamail.input.InputJavamail pop3
POP3 object to perform connections with the mail server


host

java.lang.String host
mail host to connect to


username

java.lang.String username
mail user login


password

java.lang.String password
mail user password


allmessages

java.util.Vector allmessages
all messages in the mail boxes

Constructor Detail

S13_mail_reader

public S13_mail_reader(java.lang.String Sservice_number,
                       java.util.Hashtable queueParams,
                       java.util.Hashtable semaphoreParams)
Constructor that downloads the server configuration from the database


S13_mail_reader

public S13_mail_reader()
Constructor for the S13_mail_reader object

Method Detail

run

public void run()
Main processing method for the S13_mail_reader object


analyse_PDU

private boolean analyse_PDU(java.util.Vector all_pdu)
analyse the received PDUs


getNewMessagesRsp

private org.ematgine.utils.requests.PDU_request getNewMessagesRsp(org.ematgine.utils.requests.PDU_request received_pdu)
define the PDU response for S13_GET_NEW_MESSAGES


definePOP3ServerConfiguration

private void definePOP3ServerConfiguration()
                                    throws java.lang.Exception

retrieveMessageFromPOP3Server

private boolean retrieveMessageFromPOP3Server()
                                       throws java.lang.Exception
Get the information on the messages and retrieve the content of each message.


getNewMessages

private boolean getNewMessages()
                        throws java.lang.Exception
get the new and unread messages


suppress_caracter

private java.lang.String suppress_caracter(java.lang.String the_string_to_modified,
                                           java.lang.String the_string_to_suppress)
There can't be any " caracter in a mysql database