| java.lang.Object org.xsocket.connection.spi.DefaultIoProvider
DefaultIoProvider | final public class DefaultIoProvider implements IClientIoProvider,IServerIoProvider(Code) | | Server and Client IoProvider
This class is a default implementation of the
org.xsocket.connection.spi and shouldn`t be used
outside this context.
The readbuffer preallocation size and direct/non-direct mode should be set by System.properties. Please
note that current vm implementations (Juli/2007) could have problems by managing direct buffers. In this
case non-direct buffer should be used.
...
// example configuration to use non-direct memory
System.setProperty("org.xsocket.connection.server.readbuffer.usedirect", "true");
// example configuration to switch off preallocating (params like preallocation.size or preallocation.minsize will be ignored)
System.setProperty("org.xsocket.connection.server.readbuffer.preallocation.on", "false");
// example configuration to determine the preallocation buffer
System.setProperty("org.xsocket.connection.server.readbuffer.preallocation.on", "true");
System.setProperty("org.xsocket.connection.server.readbuffer.preallocation.size", "1024");
System.setProperty("org.xsocket.connection.server.readbuffer.preallocation.minsize", "8");
author: grro@xsocket.org |
Method Summary | |
public IAcceptor | create(IAcceptorCallback callback, InetSocketAddress address, int backlog, Map<String, Object> options, SSLContext sslContext, boolean sslOn) | public IAcceptor | createAcceptor(IAcceptorCallback callback, InetSocketAddress address, int backlog, Map<String, Object> options) | public IIoHandler | createClientIoHandler(InetSocketAddress remoteAddress, int connectTimeoutMillis, Map<String, Object> options) | IIoHandler | createIoHandler(boolean isClient, IoSocketDispatcher dispatcher, SocketChannel channel, SSLContext sslContext, boolean sslOn) | public IIoHandler | createSSLClientIoHandler(InetSocketAddress remoteAddress, int connectTimeoutMillis, Map<String, Object> options, SSLContext sslContext, boolean sslOn) | public String | getImplementationVersion() Return the version of this implementation. | static Object | getOption(Socket socket, String name) | static int | getReadBufferMinSizeServer() | static int | getReadBufferPreallocationsizeServer() | static Timer | getTimer() | public static boolean | isDispatcherThread() | static boolean | isReadBufferPreallocationActivated() | static boolean | isUseDirectReadBufferServer() | public boolean | preStartSecuredMode(IIoHandler ioHandler) | public ObjectName | registerMBeans(Server server, IAcceptor acceptor, String domain, String address) | static void | setOption(Socket socket, String name, Object value) | public IIoHandler | setReadTransferRate(IIoHandler ioHandler, int bytesPerSecond) | public IIoHandler | setWriteTransferRate(IIoHandler ioHandler, int bytesPerSecond) | public void | startSecuredMode(IIoHandler ioHandler, ByteBuffer[] buffers) |
CLIENT_READBUFFER_PREALLOCATION_MIN_SIZE_KEY | final public static String CLIENT_READBUFFER_PREALLOCATION_MIN_SIZE_KEY(Code) | | |
CLIENT_READBUFFER_PREALLOCATION_ON_KEY | final public static String CLIENT_READBUFFER_PREALLOCATION_ON_KEY(Code) | | |
CLIENT_READBUFFER_PREALLOCATION_SIZE_KEY | final public static String CLIENT_READBUFFER_PREALLOCATION_SIZE_KEY(Code) | | |
CLIENT_READBUFFER_USE_DIRECT_KEY | final public static String CLIENT_READBUFFER_USE_DIRECT_KEY(Code) | | |
DEFAULT_READ_BUFFER_MIN_SIZE | final public static int DEFAULT_READ_BUFFER_MIN_SIZE(Code) | | |
DEFAULT_READ_BUFFER_PREALLOCATION_ON | final public static String DEFAULT_READ_BUFFER_PREALLOCATION_ON(Code) | | |
DEFAULT_READ_BUFFER_PREALLOCATION_SIZE | final public static int DEFAULT_READ_BUFFER_PREALLOCATION_SIZE(Code) | | |
DEFAULT_USE_DIRECT_BUFFER | final public static String DEFAULT_USE_DIRECT_BUFFER(Code) | | |
SERVER_READBUFFER_PREALLOCATION_MIN_SIZE_KEY | final public static String SERVER_READBUFFER_PREALLOCATION_MIN_SIZE_KEY(Code) | | |
SERVER_READBUFFER_PREALLOCATION_ON_KEY | final public static String SERVER_READBUFFER_PREALLOCATION_ON_KEY(Code) | | |
SERVER_READBUFFER_PREALLOCATION_SIZE_KEY | final public static String SERVER_READBUFFER_PREALLOCATION_SIZE_KEY(Code) | | |
SERVER_READBUFFER_USE_DIRECT_KEY | final public static String SERVER_READBUFFER_USE_DIRECT_KEY(Code) | | |
DefaultIoProvider | public DefaultIoProvider()(Code) | | |
getImplementationVersion | public String getImplementationVersion()(Code) | | Return the version of this implementation. It consists of any string assigned
by the vendor of this implementation and does not have any particular syntax
specified or expected by the Java runtime. It may be compared for equality
with other package version strings used for this implementation
by this vendor for this package.
the version of the implementation |
getReadBufferMinSizeServer | static int getReadBufferMinSizeServer()(Code) | | |
getReadBufferPreallocationsizeServer | static int getReadBufferPreallocationsizeServer()(Code) | | |
isDispatcherThread | public static boolean isDispatcherThread()(Code) | | returns if current thread is dispatcher thread
true, if current thread is a dispatcher thread |
isReadBufferPreallocationActivated | static boolean isReadBufferPreallocationActivated()(Code) | | |
isUseDirectReadBufferServer | static boolean isUseDirectReadBufferServer()(Code) | | |
setOption | static void setOption(Socket socket, String name, Object value) throws IOException(Code) | | set a option
Parameters: socket - the socket Parameters: name - the option name Parameters: value - the option value throws: IOException - if an exception occurs |
|
|