public abstract class SocketListeningForwardingFactoryImpl<T extends SshContext> extends ClientAcceptor implements ForwardingFactory<T>
Constructor and Description |
---|
SocketListeningForwardingFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
belongsTo(ConnectionProtocol<T> connection)
Does this factory belong to the connection provided?
|
int |
bindInterface(String addressToBind,
int portToBind,
ConnectionProtocol<?> connection,
String channelType) |
int |
bindInterface(String addressToBind,
int portToBind,
ConnectionProtocol<T> connection)
A client has requested that the server start listening and forward
any subsequent connections to the client.
|
protected abstract ForwardingChannel<T> |
createChannel(String channelType,
String addressToBind,
int portToBind,
SocketChannel sc) |
boolean |
finishAccept(SelectionKey key,
ListeningInterface li)
Complete the accept operation.
|
void |
stopAccepting()
Stop accepting clients
|
void |
stopListening(boolean dropActiveTunnels)
Stop listening on active interfaces.
|
finishAccept
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChannelType, getStartedEventCode, getStoppedEventCode
public SocketListeningForwardingFactoryImpl()
public boolean belongsTo(ConnectionProtocol<T> connection)
ForwardingFactory
belongsTo
in interface ForwardingFactory<T extends SshContext>
connection
- ConnectionProtocolpublic int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<T> connection) throws IOException
ForwardingFactory
bindInterface
in interface ForwardingFactory<T extends SshContext>
addressToBind
- StringportToBind
- intconnection
- ConnectionProtocolIOException
public int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<?> connection, String channelType) throws IOException
bindInterface
in interface ForwardingFactory<T extends SshContext>
IOException
public boolean finishAccept(SelectionKey key, ListeningInterface li)
ClientAcceptor
finishAccept
in class ClientAcceptor
key
- SelectionKeyprotected abstract ForwardingChannel<T> createChannel(String channelType, String addressToBind, int portToBind, SocketChannel sc)
public void stopListening(boolean dropActiveTunnels)
ForwardingFactory
stopListening
in interface ForwardingFactory<T extends SshContext>
dropActiveTunnels
- booleanpublic void stopAccepting()
ClientAcceptor
stopAccepting
in class ClientAcceptor
Copyright © 2016. All rights reserved.