|
||||||||||
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
The APEXService
gives several properties to an APEX service.
It defines a set of option identifiers it is able to handle.
Field Summary | |
protected APEXManager |
manager
The associated manager |
static String |
SERVICENAME
The Service name |
Constructor Summary | |
APEXService()
|
Method Summary | |
abstract Hashtable |
getOptions()
Offers a Hashtable containing all identifiers of options
this service is able to handle. |
abstract void |
handleDiscarded(APEXOption option,
APEXMessage message,
int code,
String reason,
String hopName)
Is called by the ' 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. |
abstract void |
handleMessage(APEXMessage message)
Handles an incoming message destined explicitly to this service. |
abstract void |
handleOption(APEXOption option,
APEXMessage message,
String hopName)
Handles an option is found on an incoming message (handled the first time before even sending the message). |
abstract void |
handleSent(APEXOption option,
APEXMessage message,
APEXReply reply,
String hopName)
Is called by the ' APEXRelayManager ' if a message is
sent to another entity, say an or an
message is returned - but at least, the message
HAS BEEN sent! |
void |
setManager(APEXManager manager)
Updates the manager of this service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String SERVICENAME
protected APEXManager manager
Constructor Detail |
public APEXService()
Method Detail |
public abstract void handleMessage(APEXMessage message)
message
- The incoming message to handlepublic abstract void handleOption(APEXOption option, APEXMessage message, String hopName) throws APEXOptionException
APEXOption
's
method 'getApplicableEndpoints
'.
option
- The option to handlemessage
- The whole message where the option is nested inhopName
- The name of the hop (endpoint address or administrative
domain)
APEXOptionException
- Is thrown if the option isn't well-formed.APEXOption
public abstract void handleSent(APEXOption option, APEXMessage message, APEXReply reply, String hopName)
APEXRelayManager
' if a message is
sent to another entity, say an
or an
message is returned - but at least, the message
HAS BEEN sent! APEXReportService
'
may send a status report.
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 abstract 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.
option
- The option to handlemessage
- The message successfully sent (modified message)hopName
- The name of the hop (endpoint address or administrative
domain)public abstract Hashtable getOptions()
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.
public void setManager(APEXManager manager)
manager
- The manager of this service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |