public abstract class NioChannelBuilder extends ChannelBuilder
ChannelBuilder
subtype for NioChannelHub
.NioChannelHub.newChannelBuilder(String, ExecutorService)
Modifier and Type | Method and Description |
---|---|
Channel |
build(SelectableChannel r,
SelectableChannel w) |
Channel |
build(Socket s) |
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 the
ClassFilter used by the channel. |
NioChannelBuilder |
withHeaderStream(OutputStream header)
If non-null, receive the portion of data in is before
the data goes into the "binary mode".
|
NioChannelBuilder |
withJarCache(JarCache jarCache) |
NioChannelBuilder |
withMode(Channel.Mode mode)
The encoding to be used over the stream.
|
NioChannelBuilder |
withRestricted(boolean restricted)
For compatibility reasons, activates/disables all the security restriction features.
|
build, build, getBaseLoader, getCapability, getClassFilter, getDecorators, getExecutors, getHeaderStream, getJarCache, getMode, getName, getProperties, isArbitraryCallableAllowed, isRemoteClassLoadingAllowed, isRestricted, makeTransport, negotiate, with, withArbitraryCallableAllowed, withProperty, withProperty, withRemoteClassLoadingAllowed, withRoleChecker, withRoles, withRoles
public Channel build(SocketChannel socket) throws IOException
build
in class ChannelBuilder
IOException
public Channel build(SelectableChannel r, SelectableChannel w) throws IOException
IOException
public Channel build(Socket s) throws IOException
build
in class ChannelBuilder
IOException
public NioChannelBuilder withBaseLoader(ClassLoader base)
ChannelBuilder
Channel.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 the Channel
class. In such a case, specify a classloader
so that those classes resolve. If null, Channel.class.getClassLoader()
is used.withBaseLoader
in class ChannelBuilder
public NioChannelBuilder withMode(Channel.Mode mode)
ChannelBuilder
withMode
in class ChannelBuilder
public NioChannelBuilder withCapability(Capability capability)
ChannelBuilder
withCapability
in class ChannelBuilder
public NioChannelBuilder withHeaderStream(OutputStream header)
ChannelBuilder
withHeaderStream
in class ChannelBuilder
public NioChannelBuilder withRestricted(boolean restricted)
ChannelBuilder
withRestricted
in class ChannelBuilder
public NioChannelBuilder withJarCache(JarCache jarCache)
withJarCache
in class ChannelBuilder
public NioChannelBuilder withClassFilter(ClassFilter filter)
ChannelBuilder
ClassFilter
used by the channel.
By default, ClassFilter.DEFAULT
is installed.withClassFilter
in class ChannelBuilder
Copyright © 2017. All rights reserved.