Package org.eclipse.net4j

## Class Net4jUtil

- java.lang.Object
- - org.eclipse.net4j.Net4jUtil

-     public final class Net4jUtil
      extends java.lang.Object

  A utility class with various static factory and convenience methods.
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static short` | `DEFAULT_BUFFER_CAPACITY` |
    `static java.lang.String` | `SCHEME_SEPARATOR` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static ITransportConfig` | `copyTransportConfig​(org.eclipse.net4j.util.lifecycle.ILifecycle lifecycle, ITransportConfig source)` |
    `static IBufferProvider` | `createBufferFactory()` |
    `static IBufferProvider` | `createBufferFactory​(short bufferCapacity)` |
    `static IBufferPool` | `createBufferPool()` |
    `static IBufferPool` | `createBufferPool​(short bufferCapacity)` |
    `static IBufferPool` | `createBufferPool​(IBufferProvider factory)` |
    `static IAcceptor` | `getAcceptor​(org.eclipse.net4j.util.container.IManagedContainer container, java.lang.String type, java.lang.String description)` |
    `static IBufferProvider` | `getBufferProvider​(org.eclipse.net4j.util.container.IManagedContainer container)` |
    `static IConnector` | `getConnector​(org.eclipse.net4j.util.container.IManagedContainer container, java.lang.String description)` |
    `static IConnector` | `getConnector​(org.eclipse.net4j.util.container.IManagedContainer container, java.lang.String type, java.lang.String description)` |
    `static IConnector` | `getConnector​(org.eclipse.net4j.util.container.IManagedContainer container, java.lang.String type, java.lang.String description, long timeout)` |
    `static java.util.concurrent.ExecutorService` | `getExecutorService​(org.eclipse.net4j.util.container.IManagedContainer container)` |
    `static int` | `getPooledBuffers​(IBufferPool bufferPool)` |
    `static java.lang.String` | `getProtocolID​(IProtocol<?> protocol)` |
    `static int` | `getProtocolVersion​(IProtocol<?> protocol)` |
    `static long` | `getProvidedBuffers​(IBufferProvider bufferProvider)` |
    `static long` | `getRetainedBuffers​(IBufferProvider bufferProvider)` |
    `static void` | `prepareContainer​(org.eclipse.net4j.util.container.IManagedContainer container)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SCHEME_SEPARATOR

          public static final java.lang.String SCHEME_SEPARATOR

      See Also:
        Constant Field Values

    - #### DEFAULT_BUFFER_CAPACITY

          public static final short DEFAULT_BUFFER_CAPACITY

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### prepareContainer

          public static void prepareContainer​(org.eclipse.net4j.util.container.IManagedContainer container)

    - #### getExecutorService

          public static java.util.concurrent.ExecutorService getExecutorService​(org.eclipse.net4j.util.container.IManagedContainer container)

    - #### getBufferProvider

          public static IBufferProvider getBufferProvider​(org.eclipse.net4j.util.container.IManagedContainer container)

    - #### getAcceptor

          public static IAcceptor getAcceptor​(org.eclipse.net4j.util.container.IManagedContainer container,
                                              java.lang.String type,
                                              java.lang.String description)

    - #### getConnector

          public static IConnector getConnector​(org.eclipse.net4j.util.container.IManagedContainer container,
                                                java.lang.String type,
                                                java.lang.String description,
                                                long timeout)

      Since:
        4.0

    - #### getConnector

          public static IConnector getConnector​(org.eclipse.net4j.util.container.IManagedContainer container,
                                                java.lang.String type,
                                                java.lang.String description)

    - #### getConnector

          public static IConnector getConnector​(org.eclipse.net4j.util.container.IManagedContainer container,
                                                java.lang.String description)

    - #### createBufferFactory

          public static IBufferProvider createBufferFactory​(short bufferCapacity)

    - #### createBufferFactory

          public static IBufferProvider createBufferFactory()

    - #### createBufferPool

          public static IBufferPool createBufferPool​(IBufferProvider factory)

    - #### createBufferPool

          public static IBufferPool createBufferPool​(short bufferCapacity)

    - #### createBufferPool

          public static IBufferPool createBufferPool()

    - #### getProvidedBuffers

          public static long getProvidedBuffers​(IBufferProvider bufferProvider)

    - #### getRetainedBuffers

          public static long getRetainedBuffers​(IBufferProvider bufferProvider)

    - #### getPooledBuffers

          public static int getPooledBuffers​(IBufferPool bufferPool)

    - #### copyTransportConfig

          public static ITransportConfig copyTransportConfig​(org.eclipse.net4j.util.lifecycle.ILifecycle lifecycle,
                                                             ITransportConfig source)

      Since:
        2.0

    - #### getProtocolID

          public static java.lang.String getProtocolID​(IProtocol<?> protocol)

      Since:
        4.2

    - #### getProtocolVersion

          public static int getProtocolVersion​(IProtocol<?> protocol)

      Since:
        4.2