|
|||||||||
| Home >> All >> org >> ematgine >> utils >> [ requests overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.ematgine.utils.requests
Class PDU_request

java.lang.Objectorg.ematgine.utils.requests.PDU_request
- All Implemented Interfaces:
- java.util.Comparator, java.io.Serializable
- public class PDU_request
- extends java.lang.Object
- implements java.util.Comparator, java.io.Serializable
- extends java.lang.Object
The Packet Data Unit class used for communication between administrative services. It determines wether a service is compatible with a specific version of the eMATgine server. For a given PDU_type, the PDU_request structure is defined in the 'Administrative threads interface document'.
| Field Summary | |
private java.util.Hashtable |
basic_attributes
the user basic definition in S8 userbase database |
private java.lang.String |
confirmation_received
confirmation reception status : -1: no confirmation expected 0: confirmation expected 1: confirmation received default is 'no confirmation expected' |
private java.util.Hashtable |
content
Content of the PDU |
private java.util.GregorianCalendar |
creation_date
Creation date of the PDU |
private java.lang.String |
from_sub_thread
The origin sub_thread |
private java.lang.String |
from_thread
The origin thread |
private int |
number_of_waited_PDU_before_treatment
number of waited PDU before treatment |
private java.util.Vector |
other_PDU_request
Other PDU necessary to treat the request associated to the PDU |
private int |
pdu_origin
PDU origin : 0 request 1 response 2 confirmation -1 not defined |
private int |
pdu_service_number
Description of the Field |
private java.lang.String |
priority
Management information of the PDU |
private java.lang.String |
response_received
response reception status : -1: no response expected 0: response expected 1: response received default is 'response expected' |
private java.lang.String |
send_tries
Number of atempts to send the PDU |
private java.util.Hashtable |
service_attributes
the user service definition in service userbase database |
private java.lang.String |
service_pdu_number
The PDU number associated to a thread |
private int |
step
step of the automaton |
private java.lang.String |
to_channel
The destination thread |
private java.lang.String |
to_sub_channel
The destination sub thread |
private int |
type
Type of the PDU according to PDU_type |
| Constructor Summary | |
PDU_request()
Constructor |
|
PDU_request(int the_type,
java.lang.String the_priority,
java.util.Hashtable the_content)
Constructor |
|
PDU_request(java.lang.String name)
Constructor |
|
| Method Summary | |
void |
addOtherPDURequest(PDU_request other_PDU)
add other PDU request |
void |
addOtherPDUResponse(PDU_request other_PDU)
add other PDU response |
void |
change_direction()
shift the from_thread attribute and to_channel attribute |
void |
clear_content()
Clear the content of a PDU |
private int |
compare_priority(PDU_request obj1,
PDU_request obj2)
Compare the priority of the threads |
int |
compare(java.lang.Object obj1,
java.lang.Object obj2)
compare two PDU_request |
boolean |
containsWaitingResponse(PDU_request other_PDU)
is this PDU request declared as waited in the PDU |
void |
decrement_number_of_waited_PDU()
STATE/TRANSITION diagram: decrement the number of waited PDU |
private java.lang.String |
defineCurrentDate()
return the current date in a PDU format |
void |
display_PDU_request()
Display the pdu on screen |
boolean |
equals(PDU_request obj1)
equal operator |
java.lang.String |
get_channel()
get: which channel the PDU has been sent to |
java.lang.String |
get_confirmation_status()
return the confirmation status |
java.util.Hashtable |
get_content()
get the content of the request |
java.lang.String |
get_from_sub_thread()
get which sub thread the PDU has been sent from |
java.lang.String |
get_from_thread()
get which thread the PDU has been sent from |
int |
get_number_of_waited_PDU()
STATE/TRANSITION diagram: get the number of waited PDU to pass transition |
java.lang.String |
get_PDU_number()
get PDU_number |
java.lang.String |
get_priority()
get the priority of the request |
java.lang.String |
get_response_status()
return the response status |
int |
get_send_tries()
get how many times the PDU has been proposed to be sent |
java.lang.String |
get_sub_channel()
get: which sub channel the PDU has been sent to |
int |
get_type()
get the type of the request |
java.lang.Object |
getContent(java.lang.String the_key)
Access to the first hashtable found in the content vector |
java.lang.String |
getpdu_service_number()
Description of the Method |
int |
getPDUorigin()
get the PDU origin |
java.util.Hashtable |
getRequestingUserBasicAttributes()
get the user basic S8 userbase attributes |
java.util.Hashtable |
getRequestingUserServiceAttributes()
get the user service userbase attributes |
int |
getStep()
Gets the step attribute of the PDU_request object |
private java.lang.String |
hashtableToXML(java.util.Hashtable content)
transform a hashtable in sub-XML string |
private java.lang.String |
hashtableToXML(java.util.Vector content)
Description of the Method |
void |
increment_number_of_waited_PDU()
STATE/TRANSITION diagram: increment the number of waited PDU |
void |
increment_send_tries()
increment the number of times the PDU has been proposed to be sent |
boolean |
isPDUAcknowledgment()
check if the PDU origin is Request |
boolean |
isPDURequest()
check if the PDU origin is Request |
boolean |
isPDUResponse()
check if the PDU origin is Response |
private boolean |
isResponseOf(PDU_request other_PDU)
|
boolean |
isWaitingOtherResponse()
is there other PDU request declared as waited in the PDU |
private void |
readObject(java.io.ObjectInputStream in)
For encryption during serialization |
private void |
saveXMLStringToFile(java.lang.String xmlPDU)
Description of the Method |
void |
set_channel(java.lang.String to)
set the channel the PDU will be put in |
void |
set_content(java.util.Hashtable the_content)
set the content of the PDU |
void |
set_from_sub_thread(java.lang.String from)
set the thread name of the PDU |
void |
set_from_thread(java.lang.String from)
set the thread name of the PDU |
void |
set_PDU_number(int PDU_number)
set the PDU number |
void |
set_priority(int the_prio)
set the priority of the PDU |
void |
set_priority(java.lang.String the_prio)
Description of the Method |
void |
set_to_confirmation_expected()
Set the confirmation_received flag to EXPECTED |
void |
set_to_confirmation_not_expected()
Set the confirmation_received flag to NOT EXPECTED |
void |
set_to_confirmation_received()
set the confirmation_received flag to RECEIVED |
void |
set_to_response_expected()
set the response_flag to EXPECTED |
void |
set_to_response_not_expected()
set the response_flag to NOT EXPECTED |
void |
set_to_response_received()
set the response_received flag to RECEIVED |
void |
set_type(int the_type)
set the type of the PDU |
void |
setpdu_service_number(int _ff)
set pdu_service_number |
void |
setPDUoriginToAcknowledgment()
set the PDU origin to Acknowledgment |
void |
setPDUoriginToRequest()
set the PDU origin to Request |
void |
setPDUoriginToResponse()
set the PDU origin to Response |
void |
setRequestingUserBasicAttributes(java.util.Hashtable value)
get the user attributes |
void |
setRequestingUserServiceAttributes(java.util.Hashtable value)
set the user service userbase attributes |
void |
setStep(int val)
set the step of the PDU_request object |
java.lang.String |
toShortXMLString()
Generate a PDU in a short XML format: no basic attribute, service attribute |
java.lang.String |
toXMLString()
Generate a PDU in XML format |
java.lang.String |
toXMLStringWithEnveloppe(boolean save)
Generate a PDU in XML format with XML enveloppe |
java.lang.String |
toXMLStringWithEnveloppe(boolean save,
java.lang.String begin)
Description of the Method |
private void |
writeObject(java.io.ObjectOutputStream out)
For encryption during serialization |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
| Field Detail |
step
private int step
- step of the automaton
pdu_service_number
private int pdu_service_number
- Description of the Field
priority
private java.lang.String priority
- Management information of the PDU
from_thread
private java.lang.String from_thread
- The origin thread
from_sub_thread
private java.lang.String from_sub_thread
- The origin sub_thread
to_channel
private java.lang.String to_channel
- The destination thread
to_sub_channel
private java.lang.String to_sub_channel
- The destination sub thread
type
private int type
- Type of the PDU according to PDU_type
send_tries
private java.lang.String send_tries
- Number of atempts to send the PDU
service_pdu_number
private java.lang.String service_pdu_number
- The PDU number associated to a thread
pdu_origin
private int pdu_origin
- PDU origin : 0 request 1 response 2 confirmation -1 not defined
creation_date
private java.util.GregorianCalendar creation_date
- Creation date of the PDU
confirmation_received
private java.lang.String confirmation_received
- confirmation reception status : -1: no confirmation expected 0:
confirmation expected 1: confirmation received default is 'no confirmation
expected'
response_received
private java.lang.String response_received
- response reception status : -1: no response expected 0: response expected
1: response received default is 'response expected'
number_of_waited_PDU_before_treatment
private int number_of_waited_PDU_before_treatment
- number of waited PDU before treatment
content
private java.util.Hashtable content
- Content of the PDU
other_PDU_request
private java.util.Vector other_PDU_request
- Other PDU necessary to treat the request associated to the PDU
basic_attributes
private java.util.Hashtable basic_attributes
- the user basic definition in S8 userbase database
service_attributes
private java.util.Hashtable service_attributes
- the user service definition in service userbase database
| Constructor Detail |
PDU_request
public PDU_request()
- Constructor
PDU_request
public PDU_request(java.lang.String name)
- Constructor
PDU_request
public PDU_request(int the_type,
java.lang.String the_priority,
java.util.Hashtable the_content)
- Constructor
| Method Detail |
getStep
public int getStep()
- Gets the step attribute of the PDU_request object
setStep
public void setStep(int val)
- set the step of the PDU_request object
get_type
public int get_type()
- get the type of the request
get_priority
public java.lang.String get_priority()
- get the priority of the request
get_from_thread
public java.lang.String get_from_thread()
- get which thread the PDU has been sent from
get_from_sub_thread
public java.lang.String get_from_sub_thread()
- get which sub thread the PDU has been sent from
get_channel
public java.lang.String get_channel()
- get: which channel the PDU has been sent to
get_sub_channel
public java.lang.String get_sub_channel()
- get: which sub channel the PDU has been sent to
get_PDU_number
public java.lang.String get_PDU_number()
- get PDU_number
get_number_of_waited_PDU
public int get_number_of_waited_PDU()
- STATE/TRANSITION diagram: get the number of waited PDU to pass transition
increment_number_of_waited_PDU
public void increment_number_of_waited_PDU()
- STATE/TRANSITION diagram: increment the number of waited PDU
decrement_number_of_waited_PDU
public void decrement_number_of_waited_PDU()
- STATE/TRANSITION diagram: decrement the number of waited PDU
get_send_tries
public int get_send_tries()
- get how many times the PDU has been proposed to be sent
increment_send_tries
public void increment_send_tries()
- increment the number of times the PDU has been proposed to be sent
get_content
public java.util.Hashtable get_content()
- get the content of the request
clear_content
public void clear_content()
- Clear the content of a PDU
set_content
public void set_content(java.util.Hashtable the_content)
- set the content of the PDU
getContent
public java.lang.Object getContent(java.lang.String the_key)
- Access to the first hashtable found in the content vector
get_response_status
public java.lang.String get_response_status()
- return the response status
get_confirmation_status
public java.lang.String get_confirmation_status()
- return the confirmation status
set_from_thread
public void set_from_thread(java.lang.String from)
- set the thread name of the PDU
set_from_sub_thread
public void set_from_sub_thread(java.lang.String from)
- set the thread name of the PDU
set_priority
public void set_priority(int the_prio)
- set the priority of the PDU
set_priority
public void set_priority(java.lang.String the_prio)
- Description of the Method
set_type
public void set_type(int the_type)
- set the type of the PDU
set_channel
public void set_channel(java.lang.String to)
- set the channel the PDU will be put in
set_PDU_number
public void set_PDU_number(int PDU_number)
- set the PDU number
set_to_confirmation_expected
public void set_to_confirmation_expected()
- Set the confirmation_received flag to EXPECTED
set_to_confirmation_not_expected
public void set_to_confirmation_not_expected()
- Set the confirmation_received flag to NOT EXPECTED
set_to_confirmation_received
public void set_to_confirmation_received()
- set the confirmation_received flag to RECEIVED
set_to_response_not_expected
public void set_to_response_not_expected()
- set the response_flag to NOT EXPECTED
set_to_response_expected
public void set_to_response_expected()
- set the response_flag to EXPECTED
set_to_response_received
public void set_to_response_received()
- set the response_received flag to RECEIVED
setpdu_service_number
public void setpdu_service_number(int _ff)
- set pdu_service_number
getpdu_service_number
public java.lang.String getpdu_service_number()
- Description of the Method
change_direction
public void change_direction()
- shift the from_thread attribute and to_channel attribute
compare
public int compare(java.lang.Object obj1, java.lang.Object obj2)
- compare two PDU_request
- Specified by:
comparein interfacejava.util.Comparator
equals
public boolean equals(PDU_request obj1)
- equal operator
compare_priority
private int compare_priority(PDU_request obj1, PDU_request obj2)
- Compare the priority of the threads
addOtherPDURequest
public void addOtherPDURequest(PDU_request other_PDU)
- add other PDU request
containsWaitingResponse
public boolean containsWaitingResponse(PDU_request other_PDU)
- is this PDU request declared as waited in the PDU
isWaitingOtherResponse
public boolean isWaitingOtherResponse()
- is there other PDU request declared as waited in the PDU
addOtherPDUResponse
public void addOtherPDUResponse(PDU_request other_PDU)
- add other PDU response
isResponseOf
private boolean isResponseOf(PDU_request other_PDU)
getPDUorigin
public int getPDUorigin()
- get the PDU origin
setPDUoriginToRequest
public void setPDUoriginToRequest()
- set the PDU origin to Request
setPDUoriginToResponse
public void setPDUoriginToResponse()
- set the PDU origin to Response
setPDUoriginToAcknowledgment
public void setPDUoriginToAcknowledgment()
- set the PDU origin to Acknowledgment
isPDURequest
public boolean isPDURequest()
- check if the PDU origin is Request
isPDUResponse
public boolean isPDUResponse()
- check if the PDU origin is Response
isPDUAcknowledgment
public boolean isPDUAcknowledgment()
- check if the PDU origin is Request
getRequestingUserBasicAttributes
public java.util.Hashtable getRequestingUserBasicAttributes()
- get the user basic S8 userbase attributes
getRequestingUserServiceAttributes
public java.util.Hashtable getRequestingUserServiceAttributes()
- get the user service userbase attributes
setRequestingUserBasicAttributes
public void setRequestingUserBasicAttributes(java.util.Hashtable value)
- get the user attributes
setRequestingUserServiceAttributes
public void setRequestingUserServiceAttributes(java.util.Hashtable value)
- set the user service userbase attributes
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
- For encryption during serialization
defineCurrentDate
private java.lang.String defineCurrentDate()
- return the current date in a PDU format
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- For encryption during serialization
toXMLStringWithEnveloppe
public java.lang.String toXMLStringWithEnveloppe(boolean save)
- Generate a PDU in XML format with XML enveloppe
toXMLStringWithEnveloppe
public java.lang.String toXMLStringWithEnveloppe(boolean save, java.lang.String begin)
- Description of the Method
saveXMLStringToFile
private void saveXMLStringToFile(java.lang.String xmlPDU)
- Description of the Method
toXMLString
public java.lang.String toXMLString()
- Generate a PDU in XML format
toShortXMLString
public java.lang.String toShortXMLString()
- Generate a PDU in a short XML format: no basic attribute, service attribute
hashtableToXML
private java.lang.String hashtableToXML(java.util.Hashtable content)
- transform a hashtable in sub-XML string
hashtableToXML
private java.lang.String hashtableToXML(java.util.Vector content)
- Description of the Method
display_PDU_request
public void display_PDU_request()
- Display the pdu on screen
|
|||||||||
| Home >> All >> org >> ematgine >> utils >> [ requests overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.ematgine.utils.requests.PDU_request