public class TcpHandler extends Object implements ServerFacade
| Constructor and Description |
|---|
TcpHandler(InetAddress address,
int port)
Constructor of TCPHandler that listens on selected address and port.
|
TcpHandler(int port)
Constructor of TCPHandler that listens on selected port.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAddress() |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
getIsOnlineFuture() |
int |
getNumberOfConnections() |
int |
getPort() |
io.netty.channel.nio.NioEventLoopGroup |
getWorkerGroup() |
void |
initiateEventLoopGroups(org.opendaylight.ocpjava.protocol.api.connection.ThreadConfiguration threadConfiguration)
Initiate event loop groups
|
void |
run()
Starts server on selected port.
|
void |
setChannelInitializer(TcpChannelInitializer channelInitializer) |
void |
setThreadConfig(org.opendaylight.ocpjava.protocol.api.connection.ThreadConfiguration threadConfig)
Sets thread configuration
|
com.google.common.util.concurrent.ListenableFuture<Boolean> |
shutdown()
Shuts down
TcpHandler} |
public TcpHandler(int port)
port - listening port of TCPHandler serverpublic TcpHandler(InetAddress address, int port)
address - listening address of TCPHandler serverport - listening port of TCPHandler serverpublic com.google.common.util.concurrent.ListenableFuture<Boolean> shutdown()
TcpHandler}shutdown in interface ShutdownProviderpublic int getNumberOfConnections()
public com.google.common.util.concurrent.ListenableFuture<Boolean> getIsOnlineFuture()
getIsOnlineFuture in interface OnlineProviderpublic int getPort()
public String getAddress()
public void setChannelInitializer(TcpChannelInitializer channelInitializer)
channelInitializer - public void setThreadConfig(org.opendaylight.ocpjava.protocol.api.connection.ThreadConfiguration threadConfig)
ServerFacadesetThreadConfig in interface ServerFacadethreadConfig - desired thread configurationpublic void initiateEventLoopGroups(org.opendaylight.ocpjava.protocol.api.connection.ThreadConfiguration threadConfiguration)
threadConfiguration - number of threads to be created, if not specified in threadConfigpublic io.netty.channel.nio.NioEventLoopGroup getWorkerGroup()
Copyright © 2016 OpenDaylight. All Rights Reserved.