public class RelayUtils extends Object
| Constructor and Description |
|---|
RelayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Message |
decodeMessage(Buffer buf,
InetSocketAddress recipient,
InetSocketAddress sender,
SignatureFactory signatureFactory) |
static Buffer |
encodeMessage(Message message,
SignatureFactory signatureFactory) |
static Collection<PeerAddress> |
flatten(List<Map<Number160,PeerStatatistic>> maps) |
static FutureResponse |
sendSingle(PeerConnection peerConnection,
FutureResponse futureResponse,
PeerBean peerBean,
ConnectionBean connectionBean,
ConnectionConfiguration config)
Send a Message from one Peer to another Peer internally.
|
static List<Map<Number160,PeerStatatistic>> |
unflatten(Collection<PeerAddress> map,
PeerAddress sender) |
public static Buffer encodeMessage(Message message, SignatureFactory signatureFactory) throws InvalidKeyException, SignatureException, IOException
public static Message decodeMessage(Buffer buf, InetSocketAddress recipient, InetSocketAddress sender, SignatureFactory signatureFactory) throws InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, SignatureException, IOException
public static List<Map<Number160,PeerStatatistic>> unflatten(Collection<PeerAddress> map, PeerAddress sender)
public static Collection<PeerAddress> flatten(List<Map<Number160,PeerStatatistic>> maps)
public static FutureResponse sendSingle(PeerConnection peerConnection, FutureResponse futureResponse, PeerBean peerBean, ConnectionBean connectionBean, ConnectionConfiguration config)
peerConnection - futureResponse - peerBean - connectionBean - config - Copyright © 2014. All rights reserved.