public final class NettyMessagingTransport extends Object implements Transport
Modifier and Type | Field and Description |
---|---|
static String |
UNKNOWN_HOST_NAME
Indicates a hostname that isn't set or known.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all channels and releases all resources.
|
<T> Link<T> |
get(SocketAddress remoteAddr)
Returns a link for the remote address if already cached; otherwise, returns null.
|
int |
getListeningPort()
Gets a server listening port of this transport.
|
SocketAddress |
getLocalAddress()
Gets a server local socket address of this transport.
|
<T> Link<T> |
open(SocketAddress remoteAddr,
Encoder<? super T> encoder,
LinkListener<? super T> listener)
Returns a link for the remote address if cached; otherwise opens, caches and returns.
|
void |
registerErrorHandler(EventHandler<Exception> handler)
Registers the exception event handler.
|
public static final String UNKNOWN_HOST_NAME
public void close()
close
in interface AutoCloseable
public <T> Link<T> open(SocketAddress remoteAddr, Encoder<? super T> encoder, LinkListener<? super T> listener) throws IOException
open
in interface Transport
remoteAddr
- the remote socket addressencoder
- the encoderlistener
- the link listenerIOException
public <T> Link<T> get(SocketAddress remoteAddr)
public SocketAddress getLocalAddress()
getLocalAddress
in interface Transport
public int getListeningPort()
getListeningPort
in interface Transport
public void registerErrorHandler(EventHandler<Exception> handler)
registerErrorHandler
in interface Transport
handler
- the exception event handlerCopyright © 2017 The Apache Software Foundation. All rights reserved.