Package org.jenkinsci.remoting.nio
Class NioChannelBuilder
- java.lang.Object
-
- hudson.remoting.ChannelBuilder
-
- org.jenkinsci.remoting.nio.NioChannelBuilder
-
public abstract class NioChannelBuilder extends ChannelBuilder
ChannelBuilder
subtype forNioChannelHub
.- Since:
- 2.38
- Author:
- Kohsuke Kawaguchi
- See Also:
NioChannelHub.newChannelBuilder(String, ExecutorService)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Channel
build(Socket s)
Channel
build(SelectableChannel r, SelectableChannel w)
Channel
build(SocketChannel socket)
NioChannelBuilder
withBaseLoader(ClassLoader base)
Specify the classloader used for deserializing remote commands.NioChannelBuilder
withCapability(Capability capability)
Controls the capabilities that we'll advertise to the other side.NioChannelBuilder
withClassFilter(ClassFilter filter)
Replaces theClassFilter
used by the channel.NioChannelBuilder
withHeaderStream(OutputStream header)
If non-null, receive the portion of data inis
before the data goes into the "binary mode".NioChannelBuilder
withJarCache(JarCache jarCache)
Sets the JAR cache storage.NioChannelBuilder
withMode(Channel.Mode mode)
The encoding to be used over the stream.NioChannelBuilder
withoutJarCache()
Resets JAR Cache setting to the default.NioChannelBuilder
withRestricted(boolean restricted)
For compatibility reasons, activates/disables all the security restriction features.-
Methods inherited from class hudson.remoting.ChannelBuilder
build, build, getBaseLoader, getCapability, getClassFilter, getDecorators, getExecutors, getHeaderStream, getJarCache, getMode, getName, getProperties, isArbitraryCallableAllowed, isRemoteClassLoadingAllowed, isRestricted, makeTransport, negotiate, with, withArbitraryCallableAllowed, withJarCacheOrDefault, withProperty, withProperty, withRemoteClassLoadingAllowed, withRoleChecker, withRoles, withRoles
-
-
-
-
Method Detail
-
build
public Channel build(SocketChannel socket) throws IOException
- Overrides:
build
in classChannelBuilder
- Throws:
IOException
-
build
public Channel build(SelectableChannel r, SelectableChannel w) throws IOException
- Throws:
IOException
-
build
public Channel build(Socket s) throws IOException
- Overrides:
build
in classChannelBuilder
- Throws:
IOException
-
withBaseLoader
public NioChannelBuilder withBaseLoader(ClassLoader base)
Description copied from class:ChannelBuilder
Specify the classloader used for deserializing remote commands. This is primarily related toChannel.getRemoteProperty(Object)
. Sometimes two parties communicate over a channel and pass objects around as properties, but those types might not be visible from the classloader loading theChannel
class. In such a case, specify a classloader so that those classes resolve. If null,Channel.class.getClassLoader()
is used.- Overrides:
withBaseLoader
in classChannelBuilder
-
withMode
public NioChannelBuilder withMode(Channel.Mode mode)
Description copied from class:ChannelBuilder
The encoding to be used over the stream.- Overrides:
withMode
in classChannelBuilder
-
withCapability
public NioChannelBuilder withCapability(Capability capability)
Description copied from class:ChannelBuilder
Controls the capabilities that we'll advertise to the other side.- Overrides:
withCapability
in classChannelBuilder
-
withHeaderStream
public NioChannelBuilder withHeaderStream(OutputStream header)
Description copied from class:ChannelBuilder
If non-null, receive the portion of data inis
before the data goes into the "binary mode". This is useful when the established communication channel might include some data that might be useful for debugging/trouble-shooting.- Overrides:
withHeaderStream
in classChannelBuilder
-
withRestricted
public NioChannelBuilder withRestricted(boolean restricted)
Description copied from class:ChannelBuilder
For compatibility reasons, activates/disables all the security restriction features.- Overrides:
withRestricted
in classChannelBuilder
-
withJarCache
public NioChannelBuilder withJarCache(JarCache jarCache)
Description copied from class:ChannelBuilder
Sets the JAR cache storage.- Overrides:
withJarCache
in classChannelBuilder
- Parameters:
jarCache
- JAR Cache to be used. If a deprecatednull
value is passed, the behavior will be determined by theChannel
implementation.- Returns:
this
-
withoutJarCache
public NioChannelBuilder withoutJarCache()
Description copied from class:ChannelBuilder
Resets JAR Cache setting to the default. The behavior will be determined by theChannel
implementation.- Overrides:
withoutJarCache
in classChannelBuilder
-
withClassFilter
public NioChannelBuilder withClassFilter(ClassFilter filter)
Description copied from class:ChannelBuilder
Replaces theClassFilter
used by the channel. By default,ClassFilter.DEFAULT
is installed.- Overrides:
withClassFilter
in classChannelBuilder
-
-