|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.client.PastryAppl | +--rice.pastry.client.CommonAPIAppl | +--solar.service.transport.PastryTransport
A Pastry transport application interfacing with Pastry routing substrate.
Nested Class Summary | |
private static class |
PastryTransport.MultiplexAddress
|
Field Summary | |
protected AduFactory |
_aduFactory
|
protected static rice.pastry.security.Credentials |
_cred
Credentials of this Pastry application / our transport layer. |
protected Address |
_laddr
The local transport address for Pastry node. |
protected java.util.List |
_listeners
The list of transport listeners. |
protected static org.apache.log4j.Logger |
_log
Logging facility. |
protected static rice.pastry.messaging.Address |
_maddr
Local address, multiplexing over same Pastry node. |
protected rice.pastry.PastryNode |
_pnode
The pastry node associated with this application. |
Fields inherited from class rice.pastry.client.PastryAppl |
address, instance, thePastryNode |
Constructor Summary | |
PastryTransport(rice.pastry.PastryNode pn)
|
Method Summary | |
void |
addTransportListener(TransportListener listener)
Add a transport listener. |
void |
deliver(rice.pastry.Id key,
rice.pastry.messaging.Message msg)
|
rice.pastry.messaging.Address |
getAddress()
|
Address |
getAddressByKey(java.lang.String key)
Return a peer address by specified key. |
rice.pastry.security.Credentials |
getCredentials()
|
Address |
getLocalAddress()
Return the local address of this transport layer. |
rice.pastry.PastryNode |
getPastryNode()
|
protected void |
notifyDataReceived(Adu adu,
Header header)
Notify transport listeners about received data. |
void |
removeTransportListener(TransportListener listener)
Remove a transport listener. |
void |
send(Adu adu,
Address dest)
Send the adu over transport to destination. |
void |
send(Adu adu,
Address dest,
Id multiplex)
Send the adu over transport to destination, with a multipex ID. |
void |
send(byte[] data,
Address dest)
Send an data unit to destination address. |
void |
send(byte[] data,
Address dest,
Id multiplex)
Send an data unit to destination address with a multiplexer. |
void |
setAduFactory(AduFactory aduFactory)
Set the factory that parse the received bytes into data unit. |
void |
stop()
Stop the transport layer. |
Methods inherited from class rice.pastry.client.CommonAPIAppl |
forward, leafSetChange, localLookup, messageForAppl, neighborSet, notifyReady, range, range, receiveMessage, replicaSet, route, update |
Methods inherited from class rice.pastry.client.PastryAppl |
enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, registerReceiver, routeMsg, routeMsgDirect, routeSetChange, sendMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger _log
protected static rice.pastry.messaging.Address _maddr
protected static rice.pastry.security.Credentials _cred
protected rice.pastry.PastryNode _pnode
protected java.util.List _listeners
protected Address _laddr
protected AduFactory _aduFactory
Constructor Detail |
public PastryTransport(rice.pastry.PastryNode pn)
Method Detail |
public rice.pastry.PastryNode getPastryNode()
public void setAduFactory(AduFactory aduFactory)
Transport
setAduFactory
in interface Transport
public Address getLocalAddress()
Transport
getLocalAddress
in interface Transport
public Address getAddressByKey(java.lang.String key) throws TransportException
Transport
getAddressByKey
in interface Transport
TransportException
public void send(byte[] data, Address dest) throws TransportException
Transport
send
in interface Transport
TransportException
public void send(byte[] data, Address dest, Id multiplex) throws TransportException
Transport
send
in interface Transport
TransportException
public void send(Adu adu, Address dest) throws TransportException
Transport
send
in interface Transport
TransportException
public void send(Adu adu, Address dest, Id multiplex) throws TransportException
Transport
send
in interface Transport
TransportException
public void addTransportListener(TransportListener listener)
Transport
addTransportListener
in interface Transport
public void removeTransportListener(TransportListener listener)
Transport
removeTransportListener
in interface Transport
public void stop()
Transport
stop
in interface Transport
protected void notifyDataReceived(Adu adu, Header header)
public rice.pastry.messaging.Address getAddress()
getAddress
in class rice.pastry.client.PastryAppl
public rice.pastry.security.Credentials getCredentials()
getCredentials
in class rice.pastry.client.CommonAPIAppl
public void deliver(rice.pastry.Id key, rice.pastry.messaging.Message msg)
deliver
in class rice.pastry.client.CommonAPIAppl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |