|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.epfl.lsr.apex.APEXManager ch.epfl.lsr.apex.APEXRelayManager
The APEXRelayManager
is called from a instanciated from a
relay process (implementing APEXRelayProcess
). As soon as
the constructor is called, a listener on the specified port is created.
Field Summary |
Fields inherited from class ch.epfl.lsr.apex.APEXManager |
application, lockedIdentifiers, messageTable, port, PROCESSTYPE_ENDPOINT, PROCESSTYPE_RELAY, SERVICEPRIORITIES, services, SERVICETABLE, transactionTable |
Constructor Summary | |
APEXRelayManager(APEXRelayProcess application,
String relayConfigurationFile,
String serviceConfigurationFile)
Creates an APEXRelayManager object using the well-known
TCP port number 912 assigned by the IANA. |
Method Summary | |
int |
attachEndpoint(APEXAttachMessage aam,
Object receivingChannelID)
is called when an attach element is received
a status code (for the reply is returned) |
int |
bindRelay(APEXBindMessage abm,
Object receivingChannelID)
is called when an bind element is received
a status code (for the reply is returned) |
String |
getMainAdministrativeDomain()
Returns the main administrative domain of this relay |
void |
handleIncomingMessage(APEXMessage message,
Object receivingChannelID)
When a message has been received on a connection it calls its manager's ' handleIncomingMessage ' method. |
void |
messageDiscarded(APEXDataMessage message,
int code,
String reason)
This mesthod is called when a connection wasn't able to send an ' APEXMessage ', say a
(where x ! |
void |
messageSent(APEXDataMessage message,
APEXReply reply)
This mesthod is called when an ' APEXDataMessage ' is
successfully sent on a connection, say an
element has been received. |
int |
sendAPEXDataMessage(APEXDataMessage message)
Sends an APEXDataMessage to the recipients specified
within the object. |
int |
terminate(APEXTerminateMessage atm,
Object receivingChannelID)
Is called when an terminate element is received a status
code (for the reply is returned). |
Methods inherited from class ch.epfl.lsr.apex.APEXManager |
addTransaction, debug, getApplication, getFromTable, getFromTableAndLock, getTransaction, notification, parsePort, putToTable, putToTableAndUnlock, removeAllTransactions, removeFromTable, removeTransaction, sortOptions, unlockTable, validatePort |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public APEXRelayManager(APEXRelayProcess application, String relayConfigurationFile, String serviceConfigurationFile) throws APEXException
APEXRelayManager
object using the well-known
TCP port number 912 assigned by the IANA.
application
- An APEXRelayProcess used for call-backs.serviceConfigurationFile
- File name of a service configuration file (null
or empty if
no configuration file should be processed)relayConfigurationFile
- File name of a relay configuration file
APEXException
- If the relay configuration file cannot be found or a parsing
error appearsMethod Detail |
public int attachEndpoint(APEXAttachMessage aam, Object receivingChannelID)
attach
element is received
a status code (for the reply is returned)
aam
- The received attach messagereceivingChannelID
- Associated channel identifierpublic int bindRelay(APEXBindMessage abm, Object receivingChannelID)
bind
element is received
a status code (for the reply is returned)
abm
- The received bind messagereceivingChannelID
- The associated channel identifierpublic int terminate(APEXTerminateMessage atm, Object receivingChannelID)
terminate
element is received a status
code (for the reply is returned). This method terminates the transaction
if it exists
terminate
in class APEXManager
atm
- Associated APEXTerminateMessage
for operation
to terminate.receivingChannelID
- A channel identifier for the channel which received the
operation
public int sendAPEXDataMessage(APEXDataMessage message)
Sends an APEXDataMessage
to the recipients specified
within the object. This method regroups the recipients by administrative
domains in order to optimize the performance.
In a second step it translates the address of the next hop according the
routing points by means of the translateToRoutingPoint
method.
sendAPEXDataMessage
in class APEXManager
message
- Data message to be sent. If no recipients are specified,
no action is taken.
public void handleIncomingMessage(APEXMessage message, Object receivingChannelID) throws APEXException
handleIncomingMessage
' method. attachEndpoint
'
methodbindRelay
' method
terminate
'
methodprocessData
' method
handleIncomingMessage
in class APEXManager
message
- The incoming messagereceivingChannelID
- The channel identifier of the channel which received the
message
APEXException
- Is thrown on an error in processingpublic void messageDiscarded(APEXDataMessage message, int code, String reason)
APEXMessage
', say a
(where x != 250) is received or the next hop is not responding.
All applicable services are called by there method
'handleDiscarded
'.
messageDiscarded
in class APEXManager
message
- The message which wasn't sentcode
- The error code of this messagereason
- A textual reasonpublic void messageSent(APEXDataMessage message, APEXReply reply)
APEXDataMessage
' is
successfully sent on a connection, say an
element has been received. All applicable services are called
by there method 'handleSent
'
messageSent
in class APEXManager
message
- The message which has successfully been sentreply
- The reply object received of the next hoppublic String getMainAdministrativeDomain()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |