org.eclipse.spi.net4j
Class Acceptor

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.lifecycle.Lifecycle
          extended by org.eclipse.net4j.util.container.Container<IConnector>
              extended by org.eclipse.spi.net4j.Acceptor
All Implemented Interfaces:
IAcceptor, ITransportConfigAware, Closeable, IContainer<IConnector>, INotifier, ILifecycle, ILifecycle.DeferrableActivation, INegotiatorAware, InternalAcceptor

public abstract class Acceptor
extends Container<IConnector>
implements InternalAcceptor

Since:
2.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
 
Field Summary
 
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL
 
Constructor Summary
Acceptor()
           
 
Method Summary
 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.
 IConnector[] getElements()
           
 INegotiator getNegotiator()
           
 boolean isClosed()
           
 boolean isEmpty()
           
 void prepareConnector(InternalConnector connector)
           
 void removeConnector(IConnector connector)
           
 void setConfig(ITransportConfig config)
          Sets a new transport configuration by copying the given one.
 void setNegotiator(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, fireEvent, fireEvent, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, 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

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

getNegotiator

public INegotiator getNegotiator()
Specified by:
getNegotiator in interface INegotiatorAware

setNegotiator

public void setNegotiator(INegotiator negotiator)
Specified by:
setNegotiator in interface 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 IContainer<IConnector>
Overrides:
isEmpty in class Container<IConnector>

getElements

public IConnector[] getElements()
Specified by:
getElements in interface 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 Closeable

isClosed

public boolean isClosed()
Specified by:
isClosed in interface Closeable

doBeforeActivate

protected void doBeforeActivate()
                         throws Exception
Overrides:
doBeforeActivate in class Lifecycle
Throws:
Exception

doDeactivate

protected void doDeactivate()
                     throws Exception
Overrides:
doDeactivate in class Lifecycle
Throws:
Exception


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.