Package org.jenkinsci.remoting.engine
Class JnlpProtocolHandlerFactory
java.lang.Object
org.jenkinsci.remoting.engine.JnlpProtocolHandlerFactory
Builds a set of
JnlpProtocolHandler
instances from the supplied preconditions.- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<JnlpProtocolHandler<? extends JnlpConnectionState>>
handlers()
Creates the list ofJnlpProtocolHandler
instances that are available with the current configuration.withClientDatabase
(JnlpClientDatabase clientDatabase) Add aJnlpClientDatabase
.Add aIOHub
.withNioChannelHub
(NioChannelHub nioChannelHub) Add aNioChannelHub
.withPreferNonBlockingIO
(boolean preferNio) Set the I/O blocking mode preferenceswithSSLClientAuthRequired
(boolean needClientAuth) Set the policy on client authentication certificates to use forJnlpProtocolHandler.handle(Socket, Map, List)
calls.withSSLContext
(SSLContext context) Add aSSLContext
.
-
Constructor Details
-
JnlpProtocolHandlerFactory
Constructor.- Parameters:
threadPool
- the thread pool to use.
-
-
Method Details
-
withNioChannelHub
Add aNioChannelHub
.- Parameters:
nioChannelHub
- theNioChannelHub
.- Returns:
this
for method chaining.
-
withIOHub
Add aIOHub
.- Parameters:
ioHub
- theIOHub
.- Returns:
this
for method chaining.
-
withSSLContext
Add aSSLContext
.- Parameters:
context
- theSSLContext
.- Returns:
this
for method chaining.
-
withSSLClientAuthRequired
Set the policy on client authentication certificates to use forJnlpProtocolHandler.handle(Socket, Map, List)
calls.- Parameters:
needClientAuth
-true
to reject connections over TLS where the client does not present a client certificate.- Returns:
this
for method chaining.
-
withPreferNonBlockingIO
Set the I/O blocking mode preferences- Parameters:
preferNio
-true
to prefer using Non-Blocking I/O techniques,false
to prefer thread-per-connection Blocking I/O.- Returns:
this
for method chaining.
-
withClientDatabase
public JnlpProtocolHandlerFactory withClientDatabase(@CheckForNull JnlpClientDatabase clientDatabase) Add aJnlpClientDatabase
.- Parameters:
clientDatabase
- theJnlpClientDatabase
.- Returns:
this
for method chaining.
-
handlers
Creates the list ofJnlpProtocolHandler
instances that are available with the current configuration.- Returns:
- the
JnlpProtocolHandler
instances, may be empty, nevernull
-