|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Identifier
- The type of node this layer operates on.MessageType
- The type of message this layer sends.E
- The type of exceptions this layer produces.public interface TransportLayer<Identifier,MessageType>
The transport layer does provides the minimum functionality to provide communication with flow control.
Method Summary | |
---|---|
void |
acceptMessages(boolean b)
Toggle accepting incoming messages. |
void |
acceptSockets(boolean b)
Toggle accepting new sockets. |
Identifier |
getLocalIdentifier()
The local node. |
SocketRequestHandle<Identifier> |
openSocket(Identifier i,
SocketCallback<Identifier> deliverSocketToMe,
java.util.Map<java.lang.String,java.lang.Integer> options)
Open a socket to the Identifier |
MessageRequestHandle<Identifier,MessageType> |
sendMessage(Identifier i,
MessageType m,
MessageCallback<Identifier,MessageType> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Integer> options)
Send the message to the identifier |
void |
setCallback(TransportLayerCallback<Identifier,MessageType> callback)
Set the callback for incoming sockets/messages |
void |
setErrorHandler(ErrorHandler<Identifier> handler)
To be notified of problems not related to an outgoing messaage/socket. |
Methods inherited from interface rice.Destructable |
---|
destroy |
Method Detail |
---|
SocketRequestHandle<Identifier> openSocket(Identifier i, SocketCallback<Identifier> deliverSocketToMe, java.util.Map<java.lang.String,java.lang.Integer> options)
i
- who to open the socket todeliverSocketToMe
- the callback when the socket is openedoptions
- options on how to open the socket (don't source route, encrypt etc) (may not be respected if layer cannot provide service)
MessageRequestHandle<Identifier,MessageType> sendMessage(Identifier i, MessageType m, MessageCallback<Identifier,MessageType> deliverAckToMe, java.util.Map<java.lang.String,java.lang.Integer> options)
i
- the destinationm
- the messageoptions
- delivery options (don't source route, encrypt etc) (may not be respected if layer cannot provide service)deliverAckToMe
- layer dependent notification when the message is sent (can indicate placed on the wire, point-to-point acknowledgement, or end-to-end acknowledgement)
Identifier getLocalIdentifier()
void acceptSockets(boolean b)
b
- void acceptMessages(boolean b)
b
- void setCallback(TransportLayerCallback<Identifier,MessageType> callback)
callback
- the callback for incoming sockets/messagesvoid setErrorHandler(ErrorHandler<Identifier> handler)
handler
- to be notified of problems not related to a specific messaage/socket.
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |