public interface ProtocolConnector extends ProtocolSessionManager
ProtocolProvider
s.
Please refer to SumUp client example.
You should connect to the desired socket address to start communication,
and then events for incoming connections will be sent to the
ProtocolHandler
of the specified ProtocolProvider
.
Threads connect to endpoint start automatically when
connect(SocketAddress, ProtocolProvider)
is invoked, and stop when
all connection attempts are finished.
Modifier and Type | Method and Description |
---|---|
ProtocolSession |
connect(java.net.SocketAddress address,
int timeout,
ProtocolProvider protocolProvider)
Connects to the specified
address with timeout. |
ProtocolSession |
connect(java.net.SocketAddress address,
ProtocolProvider protocolProvider)
Connects to the specified
address . |
ProtocolSession |
connect(java.net.SocketAddress address,
java.net.SocketAddress localAddress,
int timeout,
ProtocolProvider protocolProvider)
Connects to the specified
address with timeout. |
ProtocolSession |
connect(java.net.SocketAddress address,
java.net.SocketAddress localAddress,
ProtocolProvider protocolProvider)
Connects to the specified
address . |
getFilterChain
getExceptionMonitor, setExceptionMonitor
ProtocolSession connect(java.net.SocketAddress address, ProtocolProvider protocolProvider) throws java.io.IOException
address
. If communication starts
successfully, events are fired to the specified
protocolProvider
. This method blocks.java.io.IOException
- if failed to connectProtocolSession connect(java.net.SocketAddress address, java.net.SocketAddress localAddress, ProtocolProvider protocolProvider) throws java.io.IOException
address
. If communication starts
successfully, events are fired to the specified
protocolProvider
. This method blocks.localAddress
- the local address the channel is bound tojava.io.IOException
- if failed to connectProtocolSession connect(java.net.SocketAddress address, int timeout, ProtocolProvider protocolProvider) throws java.io.IOException
address
with timeout. If
communication starts successfully, events are fired to the specified
protocolProvider
. This method blocks.java.io.IOException
- if failed to connectProtocolSession connect(java.net.SocketAddress address, java.net.SocketAddress localAddress, int timeout, ProtocolProvider protocolProvider) throws java.io.IOException
address
with timeout. If
communication starts successfully, events are fired to the specified
protocolProvider
. This method blocks.localAddress
- the local address the channel is bound tojava.io.IOException
- if failed to connect