|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.epfl.lsr.apex.services.APEXService ch.epfl.lsr.apex.services.APEXReportService
The APEXReportService
represents the report service
as it is specified in RFC3340.
Field Summary | |
static String |
DESTINATION
APEX Report Service syntax: destination |
static String |
SERVICEADDRESS
Service address: apex=report |
static String |
SERVICENAME
Service name: APEXReportService |
static String |
STATUSREQUEST
APEX Report Service syntax: statusRequest |
static String |
STATUSRESPONSE
APEX Report Service syntax: statusResponse |
Fields inherited from class ch.epfl.lsr.apex.services.APEXService |
manager |
Constructor Summary | |
APEXReportService()
Instantiates a new report service |
Method Summary | |
Hashtable |
getOptions()
Offers a Hashtable containing all identifiers of options
this service is able to handle. |
static APEXOption |
getStatusRequestOption(APEXEndpointManager manager,
APEXEndpointAddress originator)
Returns an APEXOption for the specified arguments with
automatically obtained transID, targetHop='final' , and mustUnderstan='false' . |
static APEXOption |
getStatusRequestOption(APEXEndpointManager manager,
APEXEndpointAddress originator,
String targetHop)
Returns an APEXOption for the specified arguments with
automatically obtained transID and mustUnderstand='false' . |
static APEXOption |
getStatusRequestOption(APEXEndpointManager manager,
APEXEndpointAddress originator,
String targetHop,
String mustUnderstand)
Returns an APEXOption for the specified arguments with
automatically obtained transID. |
static APEXOption |
getStatusRequestOption(int transID)
Returns an APEXOption for the specified transID with
targetHop='final' and mustUnderstan='false' . |
static APEXOption |
getStatusRequestOption(int transID,
String targetHop)
Returns an APEXOption for the specified arguments and
mustUnderstand='false' . |
static APEXOption |
getStatusRequestOption(int transID,
String targetHop,
String mustUnderstand)
Returns an APEXOption for the specified arguments. |
void |
handleDiscarded(APEXOption option,
APEXMessage message,
int code,
String reason,
String hopName)
Updates the status in the hashtable for a discarded message. |
void |
handleMessage(APEXMessage message)
Handles an incoming message destined explicitly to this service. |
void |
handleOption(APEXOption option,
APEXMessage message,
String administrativeDomain)
Handles the statusRequest option for the first time:
in a RELAY: adds all status objects for alls applicable endpoints in a hashtable
in an ENDPOINT: replies with a statusResponse message
|
void |
handleSent(APEXOption option,
APEXMessage message,
APEXReply reply,
String hopName)
Updates the status in the hashtable for a sent message. |
Methods inherited from class ch.epfl.lsr.apex.services.APEXService |
setManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SERVICENAME
public static final String SERVICEADDRESS
public static final String STATUSREQUEST
public static final String STATUSRESPONSE
public static final String DESTINATION
Constructor Detail |
public APEXReportService()
Method Detail |
public void handleMessage(APEXMessage message)
APEXService
handleMessage
in class APEXService
message
- The incoming message to handleAPEXService.handleMessage(ch.epfl.lsr.apex.APEXMessage)
public Hashtable getOptions()
APEXService
Hashtable
containing all identifiers of options
this service is able to handle. The content of each entry should be a
handler (normally this
) for the corresponding
identifyer.
getOptions
in class APEXService
APEXService.getOptions()
public void handleOption(APEXOption option, APEXMessage message, String administrativeDomain) throws APEXOptionException
statusRequest
option for the first time:
statusResponse
message
handleOption
in class APEXService
option
- The option to handlemessage
- The whole message where the option is nested inadministrativeDomain
- The name of the hop (endpoint address or administrative
domain)
APEXOptionException
- Is thrown if the option isn't well-formed.APEXOption
public static APEXOption getStatusRequestOption(int transID, String targetHop, String mustUnderstand)
APEXOption
for the specified arguments.
transID
- A transaction identifiertargetHop
- The targetHop attribute's value (APEX.THIS
,
APEX.FINAL
, or APEX.ALL
)mustUnderstand
- The mustUnderstand attribute (APEX.TRUE
or
APEX.FALSE
)
APEXOption
APEX.THIS
,
APEX.FINAL
,
APEX.ALL
,
APEX.TRUE
,
APEX.FALSE
public static APEXOption getStatusRequestOption(int transID, String targetHop)
APEXOption
for the specified arguments and
mustUnderstand='false'
.
transID
- A transaction identifiertargetHop
- The targetHop attribute's value (APEX.THIS
,
APEX.FINAL
, or APEX.ALL
)
APEXOption
APEX.THIS
,
APEX.FINAL
,
APEX.ALL
public static APEXOption getStatusRequestOption(int transID)
APEXOption
for the specified transID with
targetHop='final'
and mustUnderstan='false'
.
transID
- A transaction identifier
APEXOption
public static APEXOption getStatusRequestOption(APEXEndpointManager manager, APEXEndpointAddress originator, String targetHop, String mustUnderstand) throws APEXOptionException
APEXOption
for the specified arguments with
automatically obtained transID.
manager
- The endpoint manageroriginator
- The originator endpoint addresstargetHop
- The targetHop attribute's value (APEX.THIS
,
APEX.FINAL
, or APEX.ALL
)mustUnderstand
- The mustUnderstand attribute (APEX.TRUE
or
APEX.FALSE
)
APEXOption
APEXOptionException
- Thrown if the manager is not (yet) attached as the specified
endpoint addressAPEX.THIS
,
APEX.FINAL
,
APEX.ALL
,
APEX.TRUE
,
APEX.FALSE
public static APEXOption getStatusRequestOption(APEXEndpointManager manager, APEXEndpointAddress originator, String targetHop) throws APEXOptionException
APEXOption
for the specified arguments with
automatically obtained transID and mustUnderstand='false'
.
manager
- The endpoint manageroriginator
- The originator endpoint addresstargetHop
- The targetHop attribute's value (APEX.THIS
,
APEX.FINAL
, or APEX.ALL
))
APEXOption
APEXOptionException
- Thrown if the manager is not (yet) attached as the specified
endpoint addressAPEX.THIS
,
APEX.FINAL
,
APEX.ALL
public static APEXOption getStatusRequestOption(APEXEndpointManager manager, APEXEndpointAddress originator) throws APEXOptionException
APEXOption
for the specified arguments with
automatically obtained transID, targetHop='final'
, and mustUnderstan='false'
.
manager
- The endpoint manageroriginator
- The originator endpoint address
APEXOption
APEXOptionException
- Thrown if the manager is not (yet) attached as the specified
endpoint addresspublic void handleSent(APEXOption option, APEXMessage message, APEXReply reply, String hopName)
APEXRelayManager
' if a message is
sent to another entity and an
or an
message is returned.
handleSent
in class APEXService
option
- The option to handlemessage
- The message successfully sent (modified message)reply
- The reply received by the next hophopName
- The name of the hop (endpoint address or administrative
domain)public void handleDiscarded(APEXOption option, APEXMessage message, int code, String reason, String hopName)
APEXRelayManager
' if a message is
discarded since the relay wasn't able / gave up establishing a
connection to a destination after serveral attempts or the message
hasn't been accepted.
handleDiscarded
in class APEXService
option
- The option to handlemessage
- The message successfully sent (modified message)hopName
- The name of the hop (endpoint address or administrative
domain)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |