|
||||||||||
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.APEXReliableBroadcastService
The 'Reliable Broadcast Service' is an additional service for the APEX
model. It is registered with the external URI 'http://lsrwww.epfl.ch/APEX/reliableBroadcast
'
and internal SERVICENAME 'APEXReliableBroadcast
'.
A message containing an option with the form:
invokes the use of this service.
<option external='http://lsrwww.epfl.ch/APEX/reliableBroadcast' targetHop='final'
mustUnderstand='true' transID='2'>
<endpoint identity='user1@lsrwww.epfl.ch' order='0' />
<endpoint identity='user2@ltiwww.epfl.ch' order='1' />
<endpoint identity='user3@lcawww.epfl.ch' order='2' />
</option>
The reliable service is only used in relays which go along the order of every specified endpoint and sends a message, dependant on if the order of the endpoint is less than the order of all its attached and specified endpoints and on if it hasn't already sent a message to the corresponding endpoint.
APEXService
Field Summary | |
static String |
ORDER
Reliable Broadcast service syntax: order |
static String |
RELIABLEBROADCAST
External URI for a reliable broadcast option: http://lsrwww.epfl.ch/APEX/reliableBroadcast |
static String |
SERVICENAME
Service name: APEXReliableBroadcast |
Fields inherited from class ch.epfl.lsr.apex.services.APEXService |
manager |
Constructor Summary | |
APEXReliableBroadcastService()
Creates a new APEXReliableBroadcastService within the specified
APEX manager |
Method Summary | |
Hashtable |
getOptions()
Returns a table of all options this service is willing to handle. |
static APEXOption |
getReliableBroadcastOption(APEXEndpointManager manager,
APEXEndpointAddress originator,
APEXEndpointAddress[] destinations)
Returns an ' APEXOption ' formed for 'Reliable
Broadcast'. |
void |
handleDiscarded(APEXOption option,
APEXMessage message,
int code,
String reason,
String hopName)
This method is not used for reliable broadcast service |
void |
handleMessage(APEXMessage message)
Handles an incoming message destined explicitly to this service. |
void |
handleOption(APEXOption option,
APEXMessage message,
String administrativeDomain)
Handles an option destinated to this service. |
void |
handleReliableBroadcastOption(APEXOption option,
APEXDataMessage message,
String administrativeDomain)
Handles a 'reliable broadcast' option and sends appropriate messages to the relay. |
void |
handleSent(APEXOption option,
APEXMessage message,
APEXReply reply,
String hopName)
This method is not used for reliable broadcast service |
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 RELIABLEBROADCAST
public static final String ORDER
Constructor Detail |
public APEXReliableBroadcastService()
APEXReliableBroadcastService
within the specified
APEX manager
Method Detail |
public void handleMessage(APEXMessage message)
handleMessage
in class APEXService
message
- The incoming message to handlepublic void handleOption(APEXOption option, APEXMessage message, String administrativeDomain) throws APEXOptionException
targetHop
field is set to final
and at least one endpoint is applicable.
handleOption
in class APEXService
option
- The option to handlemessage
- The message which contains the optionadministrativeDomain
- The administrative domain of the processing relay
APEXOptionException
- Thrown on an error in processing the optionAPEXOption
public Hashtable getOptions()
getOptions
in class APEXService
public void handleReliableBroadcastOption(APEXOption option, APEXDataMessage message, String administrativeDomain) throws APEXOptionException
option
- The option to handlemessage
- The message which contains the optionadministrativeDomain
- The administrative domain of the processing relay
APEXOptionException
- Thrown if there is an error in processing the optionpublic static APEXOption getReliableBroadcastOption(APEXEndpointManager manager, APEXEndpointAddress originator, APEXEndpointAddress[] destinations) throws APEXOptionException
Returns an 'APEXOption
' formed for 'Reliable
Broadcast'. The order of the endpoints depends on the order in the
address in the array, say key '0' in the array is order
'0' (first) in the reliable broadcast algorithm.
Note: a reliable broadcast option is always final and
mustUnderstand='true'
to guarantee the mechanism
manager
- The endpoint manager for the APEX communicationoriginator
- The originator of the message containing the optiondestinations
- An array of destinated endpoints (ordered!)
APEXOptionException
public void handleSent(APEXOption option, APEXMessage message, APEXReply reply, String hopName)
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)
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 |