|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.comm.net.NetConnectionHandler<UdpServer,UdpConnection,DatagramPacket>
com.kuka.comm.net.UdpConnectionHandler
public class UdpConnectionHandler
This class is responsible for handling incoming connection requests at a UDP server.
Override #acceptConnection(UdpServer, DatagramPacket) to decide
whether an incoming request is accepted. The default implementation accepts
all requests.
| Constructor Summary | |
|---|---|
UdpConnectionHandler(NetConnectionConfigurator<UdpConnection> configurator)
Creates a new UDP connection handler that accepts an unlimited number of connections and uses the given configurator to configure the connection. |
|
UdpConnectionHandler(NetConnectionConfigurator<UdpConnection> configurator,
int maxConnections)
Creates a new UDP connection handler that uses the given configurator to configure incoming connections and limits the maximum number of active connections to maxConnections. |
|
| Method Summary | |
|---|---|
protected UdpConnection |
createConnection(UdpServer server,
DatagramPacket packet)
Creates a new connection for an incoming connection request. |
| Methods inherited from class com.kuka.comm.net.NetConnectionHandler |
|---|
acceptConnection, getConfigurator, getMaxConnections, handleConnection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UdpConnectionHandler(NetConnectionConfigurator<UdpConnection> configurator)
configurator - the configurator used to configure incoming connections, must
not be null
public UdpConnectionHandler(NetConnectionConfigurator<UdpConnection> configurator,
int maxConnections)
maxConnections.
configurator - the configurator used to configure incoming connections, must
not be nullmaxConnections - the maximum number of simultaneous connections, must be
greater than 0| Method Detail |
|---|
protected final UdpConnection createConnection(UdpServer server,
DatagramPacket packet)
NetConnectionHandler
createConnection in class NetConnectionHandler<UdpServer,UdpConnection,DatagramPacket>server - the server receiving the incoming connection requestpacket - object that can be used to identify the incoming connection request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||