Package org.jenkinsci.remoting.engine
Class JnlpProtocol4ProxyHandler
java.lang.Object
org.jenkinsci.remoting.engine.JnlpProtocolHandler<JnlpConnectionState>
org.jenkinsci.remoting.engine.JnlpProtocol4ProxyHandler
Passes
JnlpConnectionState.CLIENT_NAME_KEY
using an HTTP-style header and lets the server decide how to handle that.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconnect
(Socket socket, Map<String, String> headers, List<? extends JnlpConnectionStateListener> listeners) Handles an outgoing connection to the server on the supplied socket.protected JnlpConnectionState
createConnectionState
(Socket socket, List<? extends JnlpConnectionStateListener> listeners) Creates theJnlpConnectionState
instance for thisJnlpProtocolHandler
.getName()
Get the name of the protocol.handle
(Socket socket, Map<String, String> headers, List<? extends JnlpConnectionStateListener> listeners) Handles an incoming client connection on the supplied socket.Methods inherited from class org.jenkinsci.remoting.engine.JnlpProtocolHandler
connect, getClientDatabase, handle, isEnabled, isPreferNio
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
JnlpProtocol4ProxyHandler
-
-
Method Details
-
getName
Description copied from class:JnlpProtocolHandler
Get the name of the protocol.- Specified by:
getName
in classJnlpProtocolHandler<JnlpConnectionState>
-
connect
@NonNull public Future<Channel> connect(@NonNull Socket socket, @NonNull Map<String, String> headers, @NonNull List<? extends JnlpConnectionStateListener> listeners) throws IOExceptionDescription copied from class:JnlpProtocolHandler
Handles an outgoing connection to the server on the supplied socket.- Specified by:
connect
in classJnlpProtocolHandler<JnlpConnectionState>
- Parameters:
socket
- the socket.headers
- the headers to send.listeners
- the listeners to approve and receive the connection.- Returns:
- a
Future
for theChannel
to the server. - Throws:
IOException
- if the protocol cannot be initiated.
-
handle
@NonNull public Future<Channel> handle(@NonNull Socket socket, @NonNull Map<String, String> headers, @NonNull List<? extends JnlpConnectionStateListener> listeners) throws IOExceptionDescription copied from class:JnlpProtocolHandler
Handles an incoming client connection on the supplied socket.- Specified by:
handle
in classJnlpProtocolHandler<JnlpConnectionState>
- Parameters:
socket
- the socket.headers
- the headers to send.listeners
- the listeners to approve and receive the connection.- Returns:
- a
Future
for theChannel
to the server. - Throws:
IOException
- if the protocol cannot be initiated.
-
createConnectionState
@NonNull protected JnlpConnectionState createConnectionState(@NonNull Socket socket, @NonNull List<? extends JnlpConnectionStateListener> listeners) throws IOException Description copied from class:JnlpProtocolHandler
Creates theJnlpConnectionState
instance for thisJnlpProtocolHandler
.- Specified by:
createConnectionState
in classJnlpProtocolHandler<JnlpConnectionState>
- Parameters:
socket
- theSocket
listeners
- the initialJnlpConnectionStateListener
instances.- Returns:
- the
JnlpConnectionState
for this connection. - Throws:
IOException
- if something goes wrong.
-