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
Fields -
Constructor Summary
Constructors -
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 JnlpConnectionStatecreateConnectionState(Socket socket, List<? extends JnlpConnectionStateListener> listeners) Creates theJnlpConnectionStateinstance 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:JnlpProtocolHandlerGet the name of the protocol.- Specified by:
getNamein 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:JnlpProtocolHandlerHandles an outgoing connection to the server on the supplied socket.- Specified by:
connectin classJnlpProtocolHandler<JnlpConnectionState>- Parameters:
socket- the socket.headers- the headers to send.listeners- the listeners to approve and receive the connection.- Returns:
- a
Futurefor theChannelto 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:JnlpProtocolHandlerHandles an incoming client connection on the supplied socket.- Specified by:
handlein classJnlpProtocolHandler<JnlpConnectionState>- Parameters:
socket- the socket.headers- the headers to send.listeners- the listeners to approve and receive the connection.- Returns:
- a
Futurefor theChannelto 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:JnlpProtocolHandlerCreates theJnlpConnectionStateinstance for thisJnlpProtocolHandler.- Specified by:
createConnectionStatein classJnlpProtocolHandler<JnlpConnectionState>- Parameters:
socket- theSocketlisteners- the initialJnlpConnectionStateListenerinstances.- Returns:
- the
JnlpConnectionStatefor this connection. - Throws:
IOException- if something goes wrong.
-