|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.comm.ConnectionConfigurator<C>
com.kuka.comm.net.NetConnectionConfigurator<C>
C - the connection type (e.g. TcpConnection or UdpConnection)public abstract class NetConnectionConfigurator<C extends NetConnection>
An abstract factory base class to be used in the different network server classes (e.g. TcpServer or
UdpServer).
| Constructor Summary | |
|---|---|
NetConnectionConfigurator(Encoder<Object,ByteBuffer> encoder,
Decoder<ByteBuffer,Object> decoder)
Creates a new configurator with the corresponding encoder and decoder. |
|
| Method Summary | |
|---|---|
void |
configure(C connection)
Configures the connection with the parameters that has been set in the factory. |
ReconnectStrategy |
getAutoReconnectStrategy()
Getter for the currently set ReconnectStrategy. |
Decoder<ByteBuffer,Object> |
getDecoder()
|
Encoder<Object,ByteBuffer> |
getEncoder()
|
int |
getInputBufferSize()
Returns the input buffer size. |
int |
getOutputBufferSize()
|
boolean |
isAutoReconnectStrategySet()
Check if a ReconnectStrategy has been set. |
boolean |
isInputBufferSizeSet()
Returns true of the input buffer size will be set. |
boolean |
isOutputBufferSizeSet()
Returns true of the output buffer size will be set. |
void |
setAutoReconnectStrategy(ReconnectStrategy strategy)
Setter to append an ReconnectStrategy to this Connection. |
void |
setInputBufferSize(int size)
|
void |
setOutputBufferSize(int size)
Sets the output buffer size. |
void |
unsetAutoReconnectStrategy()
Clear all references to a ReconnectStrategy. |
void |
unsetInputBufferSize()
Unsets the input buffer size. |
void |
unsetOutputBufferSize()
Unsets the output buffer size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetConnectionConfigurator(Encoder<Object,ByteBuffer> encoder,
Decoder<ByteBuffer,Object> decoder)
encoder - An encoder.decoder - A decoder.| Method Detail |
|---|
public final void setAutoReconnectStrategy(ReconnectStrategy strategy)
ReconnectStrategy to this Connection.
strategy - The ReconnectStrategy to set.public final void unsetAutoReconnectStrategy()
ReconnectStrategy.
public final boolean isAutoReconnectStrategySet()
ReconnectStrategy has been set.
Boolean value stating if it has been set or not.public final ReconnectStrategy getAutoReconnectStrategy()
ReconnectStrategy. Will return null if no strategy has been
set.
ReconnectStrategy or null, if no strategy has been set.public final void setInputBufferSize(int size)
size - the input buffer size in Bytepublic final void unsetInputBufferSize()
public final boolean isInputBufferSizeSet()
public final int getInputBufferSize()
public final void setOutputBufferSize(int size)
size - the output buffer size in Bytepublic final void unsetOutputBufferSize()
public final boolean isOutputBufferSizeSet()
public final int getOutputBufferSize()
public final Encoder<Object,ByteBuffer> getEncoder()
public final Decoder<ByteBuffer,Object> getDecoder()
public void configure(C connection)
ConnectionConfigurator
configure in class ConnectionConfigurator<C extends NetConnection>connection - the connection to be configured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||