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

Quick Search    Search Deep

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

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

public class S11_socket_access
extends org.ematgine.threads.ematgine_service

This class is used to treat socket requests from the servlet or an eMATgine client. It listens to the following socket: 7766

PDU_request sent throught the socket can be encoded or not. It is composed a two main threads:

  1. First one is waiting for new socket connection
  2. Second one is waiting for PDU_request received from the eMATgine server (not the servlet or an eMATgine client).
At each user connection, one thread is created:
  1. to handle PDU_request arrival from the servlet S10_HTTP_Access or an eMATgine client.
  2. to handle PDU_request response from the eMATgine server to the servlet or the eMATgine client


Field Summary
(package private)  int connection_number
          number to define the socket connection
 
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
S11_socket_access(java.lang.String Sservice_number, java.util.Hashtable queueParams, java.util.Hashtable semaphoreParams)
          Constructor
 
Method Summary
private  void define_connection_number()
          Define a connection number for this new socket connection (not so many connection...) TBC
 void run()
          This method will be called by whoever wishes to run your class implementing Runnable.
private  void test_S1001()
          A unit test for JUnit
 
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

connection_number

int connection_number
number to define the socket connection

Constructor Detail

S11_socket_access

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

Method Detail

test_S1001

private void test_S1001()
A unit test for JUnit


run

public void run()
Description copied from interface: java.lang.Runnable
This method will be called by whoever wishes to run your class implementing Runnable. Note that there are no restrictions on what you are allowed to do in the run method, except that you cannot throw a checked exception.


define_connection_number

private void define_connection_number()
Define a connection number for this new socket connection (not so many connection...) TBC