Modifier and Type | Class and Description |
---|---|
static class |
InetPeer.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_PORT |
Modifier and Type | Method and Description |
---|---|
static InetPeer |
build(InetAddress address) |
static InetPeer |
build(InetAddress address,
int port) |
static InetPeer |
build(InetPeerAddress peerAddress) |
static InetPeer.Builder |
builder(InetAddress address) |
static InetPeer.Builder |
builder(InetAddress address,
int port) |
static InetPeer.Builder |
builder(InetPeerAddress holder) |
InetAddress |
getInetAddress() |
PeerOptions |
getOptions() |
Optional<PeerId> |
getPeerId() |
int |
getPort() |
boolean |
isPortUnknown() |
void |
setPort(int newPort) |
String |
toString() |
public static final int UNKNOWN_PORT
public InetAddress getInetAddress()
getInetAddress
in interface Peer
public boolean isPortUnknown()
isPortUnknown
in interface Peer
Peer.getPort()
public int getPort()
getPort
in interface Peer
UNKNOWN_PORT
, if it's not known yet
(e.g. when the connection is incoming and the remote side hasn't
yet communicated to us its' listening port via extended handshake)public PeerOptions getOptions()
getOptions
in interface Peer
public void setPort(int newPort)
public static InetPeer.Builder builder(InetPeerAddress holder)
public static InetPeer.Builder builder(InetAddress address, int port)
public static InetPeer.Builder builder(InetAddress address)
public static InetPeer build(InetPeerAddress peerAddress)
public static InetPeer build(InetAddress address, int port)
public static InetPeer build(InetAddress address)
Copyright © 2016–2021. All rights reserved.