rice.pastry.socket
Class SPNFIdentitySerializer
java.lang.Object
rice.pastry.socket.SPNFIdentitySerializer
- All Implemented Interfaces:
- IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
- Direct Known Subclasses:
- RendezvousSPNFIdentitySerializer
public class SPNFIdentitySerializer
- extends java.lang.Object
- implements IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pn
protected PastryNode pn
factory
protected SocketNodeHandleFactory factory
SPNFIdentitySerializer
public SPNFIdentitySerializer(PastryNode pn,
SocketNodeHandleFactory factory)
serialize
public void serialize(OutputBuffer buf,
TransportLayerNodeHandle<MultiInetSocketAddress> i)
throws java.io.IOException
- Specified by:
serialize
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
- Throws:
java.io.IOException
deserialize
public TransportLayerNodeHandle<MultiInetSocketAddress> deserialize(InputBuffer buf,
SourceRoute<MultiInetSocketAddress> i)
throws java.io.IOException
- This is different from the normal deserializer b/c we already have the address
- Specified by:
deserialize
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
- Throws:
java.io.IOException
buildSNH
protected SocketNodeHandle buildSNH(InputBuffer buf,
MultiInetSocketAddress i,
long epoch,
Id nid)
throws java.io.IOException
- Throws:
java.io.IOException
translateDown
public MultiInetSocketAddress translateDown(TransportLayerNodeHandle<MultiInetSocketAddress> i)
- Specified by:
translateDown
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
translateUp
public MultiInetSocketAddress translateUp(SourceRoute<MultiInetSocketAddress> i)
- Specified by:
translateUp
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
addSerializerListener
public void addSerializerListener(SerializerListener<TransportLayerNodeHandle<MultiInetSocketAddress>> listener)
- Specified by:
addSerializerListener
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
removeSerializerListener
public void removeSerializerListener(SerializerListener<TransportLayerNodeHandle<MultiInetSocketAddress>> listener)
- Specified by:
removeSerializerListener
in interface IdentitySerializer<TransportLayerNodeHandle<MultiInetSocketAddress>,MultiInetSocketAddress,SourceRoute<MultiInetSocketAddress>>
Copyright © 2001-2005 - Rice Pastry.