Package org.eclipse.spi.net4j

## Class Acceptor

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.lifecycle.ShareableLifecycle
      - - org.eclipse.net4j.util.container.Container<IConnector>
        - - org.eclipse.spi.net4j.Acceptor

- All Implemented Interfaces:
    `IAcceptor`, `ITransportConfigAware`, `org.eclipse.net4j.util.collection.Closeable`, `org.eclipse.net4j.util.container.IContainer<IConnector>`, `org.eclipse.net4j.util.event.INotifier`, `org.eclipse.net4j.util.event.INotifier.INotifier2`, `org.eclipse.net4j.util.lifecycle.IDeactivateable`, `org.eclipse.net4j.util.lifecycle.ILifecycle`, `org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`, `org.eclipse.net4j.util.properties.IPropertiesContainer`, `org.eclipse.net4j.util.security.INegotiatorAware`, `InternalAcceptor`

      public abstract class Acceptor
      extends org.eclipse.net4j.util.container.Container<IConnector>
      implements InternalAcceptor

  If the meaning of this type isn't clear, there really should be more of a description here...
  Since:
    2.0
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `Acceptor.ConnectorPreparer` |

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer

      `org.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `org.eclipse.net4j.util.event.INotifier.INotifier2`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Acceptor()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addConnector​(InternalConnector connector)` |
    `void` | `close()` |
    `protected void` | `doBeforeActivate()` |
    `protected void` | `doDeactivate()` |
    `IConnector[]` | `getAcceptedConnectors()` | Returns an array of the connectors that have been accepted by this acceptor and not been closed since.
    `ITransportConfig` | `getConfig()` | Returns the current transport configuration if there is one, a new empty one otherwise.
    `Acceptor.ConnectorPreparer` | `getConnectorPreparer()` |
    `IConnector[]` | `getElements()` |
    `org.eclipse.net4j.util.security.INegotiator` | `getNegotiator()` |
    `boolean` | `isClosed()` |
    `boolean` | `isEmpty()` |
    `void` | `prepareConnector​(InternalConnector connector)` |
    `org.eclipse.net4j.util.registry.IRegistry<java.lang.String,​java.lang.Object>` | `properties()` |
    `void` | `removeConnector​(IConnector connector)` |
    `void` | `setConfig​(ITransportConfig config)` | Sets a new transport configuration by copying the given one.
    `void` | `setConnectorPreparer​(Acceptor.ConnectorPreparer connectorPreparer)` |
    `void` | `setNegotiator​(org.eclipse.net4j.util.security.INegotiator negotiator)` |

    - ### Methods inherited from class org.eclipse.net4j.util.container.Container

      `fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent`

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener`

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

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

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### Acceptor

          public Acceptor()

  - ### Method Detail

    - #### properties

          public final org.eclipse.net4j.util.registry.IRegistry<java.lang.String,​java.lang.Object> properties()

      Specified by:
        `properties` in interface `org.eclipse.net4j.util.properties.IPropertiesContainer`

    - #### getConfig

          public ITransportConfig getConfig()

      Description copied from interface: `ITransportConfigAware`
      Returns the current transport configuration if there is one, a new empty one otherwise.
      Specified by:
        `getConfig` in interface `ITransportConfigAware`

    - #### setConfig

          public void setConfig​(ITransportConfig config)

      Description copied from interface: `ITransportConfigAware`
      Sets a new transport configuration by copying the given one.
      Specified by:
        `setConfig` in interface `ITransportConfigAware`

    - #### getConnectorPreparer

          public Acceptor.ConnectorPreparer getConnectorPreparer()

      Since:
        4.10

    - #### setConnectorPreparer

          public void setConnectorPreparer​(Acceptor.ConnectorPreparer connectorPreparer)

      Since:
        4.10

    - #### getNegotiator

          public org.eclipse.net4j.util.security.INegotiator getNegotiator()

      Specified by:
        `getNegotiator` in interface `org.eclipse.net4j.util.security.INegotiatorAware`

    - #### setNegotiator

          public void setNegotiator​(org.eclipse.net4j.util.security.INegotiator negotiator)

      Specified by:
        `setNegotiator` in interface `org.eclipse.net4j.util.security.INegotiatorAware`

    - #### getAcceptedConnectors

          public IConnector[] getAcceptedConnectors()

      Description copied from interface: `IAcceptor`
      Returns an array of the connectors that have been accepted by this acceptor and not been closed since.
      Specified by:
        `getAcceptedConnectors` in interface `IAcceptor`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `org.eclipse.net4j.util.container.IContainer<IConnector>`
      Overrides:
        `isEmpty` in class `org.eclipse.net4j.util.container.Container<IConnector>`

    - #### getElements

          public IConnector[] getElements()

      Specified by:
        `getElements` in interface `org.eclipse.net4j.util.container.IContainer<IConnector>`

    - #### prepareConnector

          public void prepareConnector​(InternalConnector connector)

    - #### addConnector

          public void addConnector​(InternalConnector connector)

    - #### removeConnector

          public void removeConnector​(IConnector connector)

    - #### close

          public void close()

      Specified by:
        `close` in interface `org.eclipse.net4j.util.collection.Closeable`

    - #### isClosed

          public boolean isClosed()

      Specified by:
        `isClosed` in interface `org.eclipse.net4j.util.collection.Closeable`

    - #### doBeforeActivate

          protected void doBeforeActivate()
                                   throws java.lang.Exception

      Overrides:
        `doBeforeActivate` in class `org.eclipse.net4j.util.lifecycle.Lifecycle`
      Throws:
        `java.lang.Exception`

    - #### doDeactivate

          protected void doDeactivate()
                               throws java.lang.Exception

      Overrides:
        `doDeactivate` in class `org.eclipse.net4j.util.lifecycle.Lifecycle`
      Throws:
        `java.lang.Exception`