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

Quick Search    Search Deep

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

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

public class S1_trace
extends org.ematgine.threads.ematgine_service

This class allow the server to write on the screen and in the trace logs which can be stored on disk or in a database.
Log priority (from which priority the events are logged) is not implemented yet.


Field Summary
private  java.lang.String access_filename
          Access filename
private  java.io.PrintStream debugOut
          Description of the Field
private  boolean enable_pdu_log
          enable(true)/disable(false) the PDU log
private  java.lang.String error_filename
          Error filename
private  java.lang.String logFile
          Description of the Field
private  java.io.BufferedWriter my_access_buffered_writer
          Manage access log as buffer
private  java.io.FileWriter my_access_file_writer
          Manage access log as buffer
private  java.io.PrintWriter my_error_buffered_writer
          Manage error log as buffer
private  java.io.FileWriter my_error_file_writer
          Manage error log
private  java.io.PrintWriter my_pdu_buffered_writer
          Manage pdu log as buffer
private  java.io.FileWriter my_pdu_file_writer
          Manage pdu log
private  java.lang.String pdu_filename
          filename where to stock PDU
 
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
S1_trace(java.lang.String Sservice_number, java.util.Hashtable queueParams, java.util.Hashtable semaphoreParams)
          Constructor
 
Method Summary
private  boolean analyse_PDU(java.util.Vector all_pdu)
          analyse the received PDUs
private  java.lang.String completeDate(int date_element)
          put date element on two digits if needed
private  void init()
          init
private  void print_access_log_exception_in_file(org.ematgine.utils.requests.PDU_request pdu)
          Write in the error log
private  void print_access_log_string_in_file(org.ematgine.utils.requests.PDU_request pdu)
          Write in the access log
private  void print_error_log_string_in_file(org.ematgine.utils.requests.PDU_request pdu)
          Write in the error log
private  void print_pdu_log(org.ematgine.utils.requests.PDU_request pdu)
          Write in the error log
private  void print_screen_exception(org.ematgine.utils.requests.PDU_request pdu)
          Print on screen the exception
private  void print_screen_string(org.ematgine.utils.requests.PDU_request pdu)
          Print on screen the string
private  void println_screen_string(org.ematgine.utils.requests.PDU_request pdu)
          Println on screen the string
 void run()
          executed after start command
private  void test_of_send_waiting_pdu()
          Test of send_waiting_PDU() in ematgien_service class pre: just launch the trace thread 2Trace.size() = 1
 
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

access_filename

private java.lang.String access_filename
Access filename


my_access_buffered_writer

private java.io.BufferedWriter my_access_buffered_writer
Manage access log as buffer


my_access_file_writer

private java.io.FileWriter my_access_file_writer
Manage access log as buffer


error_filename

private java.lang.String error_filename
Error filename


pdu_filename

private java.lang.String pdu_filename
filename where to stock PDU


my_error_file_writer

private java.io.FileWriter my_error_file_writer
Manage error log


my_error_buffered_writer

private java.io.PrintWriter my_error_buffered_writer
Manage error log as buffer


my_pdu_file_writer

private java.io.FileWriter my_pdu_file_writer
Manage pdu log


my_pdu_buffered_writer

private java.io.PrintWriter my_pdu_buffered_writer
Manage pdu log as buffer


enable_pdu_log

private boolean enable_pdu_log
enable(true)/disable(false) the PDU log


logFile

private java.lang.String logFile
Description of the Field


debugOut

private java.io.PrintStream debugOut
Description of the Field

Constructor Detail

S1_trace

public S1_trace(java.lang.String Sservice_number,
                java.util.Hashtable queueParams,
                java.util.Hashtable semaphoreParams)
Constructor

Method Detail

init

private void init()
init


completeDate

private java.lang.String completeDate(int date_element)
put date element on two digits if needed


print_screen_string

private void print_screen_string(org.ematgine.utils.requests.PDU_request pdu)
Print on screen the string


println_screen_string

private void println_screen_string(org.ematgine.utils.requests.PDU_request pdu)
Println on screen the string


print_screen_exception

private void print_screen_exception(org.ematgine.utils.requests.PDU_request pdu)
Print on screen the exception


print_access_log_string_in_file

private void print_access_log_string_in_file(org.ematgine.utils.requests.PDU_request pdu)
Write in the access log


print_access_log_exception_in_file

private void print_access_log_exception_in_file(org.ematgine.utils.requests.PDU_request pdu)
Write in the error log


print_error_log_string_in_file

private void print_error_log_string_in_file(org.ematgine.utils.requests.PDU_request pdu)
Write in the error log


print_pdu_log

private void print_pdu_log(org.ematgine.utils.requests.PDU_request pdu)
Write in the error log


run

public void run()
executed after start command


analyse_PDU

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


test_of_send_waiting_pdu

private void test_of_send_waiting_pdu()
Test of send_waiting_PDU() in ematgien_service class pre: just launch the trace thread 2Trace.size() = 1