org.eclipse.spi.net4j
Class Protocol<INFRA_STRUCTURE>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.spi.net4j.Protocol<INFRA_STRUCTURE>
- All Implemented Interfaces:
- IBufferHandler, ILocationAware, IProtocol<INFRA_STRUCTURE>, IProtocol2<INFRA_STRUCTURE>, INotifier, ILifecycle, ILifecycle.DeferrableActivation, IUserAware
- Direct Known Subclasses:
- SignalProtocol
- public abstract class Protocol<INFRA_STRUCTURE>
- extends Lifecycle
- implements IProtocol2<INFRA_STRUCTURE>
If the meaning of this type isn't clear, there really should be more of a description here...
- Since:
- 2.0
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, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener |
Protocol
public Protocol(String type)
getType
public final String getType()
- Specified by:
getType
in interface IProtocol<INFRA_STRUCTURE>
getVersion
public int getVersion()
- Specified by:
getVersion
in interface IProtocol2<INFRA_STRUCTURE>
- Since:
- 4.2
getExecutorService
public ExecutorService getExecutorService()
- Specified by:
getExecutorService
in interface IProtocol<INFRA_STRUCTURE>
setExecutorService
public void setExecutorService(ExecutorService executorService)
- Specified by:
setExecutorService
in interface IProtocol<INFRA_STRUCTURE>
getBufferProvider
public IBufferProvider getBufferProvider()
- Specified by:
getBufferProvider
in interface IProtocol<INFRA_STRUCTURE>
getInfraStructure
public INFRA_STRUCTURE getInfraStructure()
- Specified by:
getInfraStructure
in interface IProtocol<INFRA_STRUCTURE>
setInfraStructure
public void setInfraStructure(INFRA_STRUCTURE infraStructure)
- Specified by:
setInfraStructure
in interface IProtocol<INFRA_STRUCTURE>
getLocation
public ILocationAware.Location getLocation()
- Description copied from interface:
ILocationAware
- Returns the location of this object in a
client
/server
scenario.
- Specified by:
getLocation
in interface ILocationAware
- Since:
- 2.0
isClient
public boolean isClient()
- Description copied from interface:
ILocationAware
- Same as
ILocationAware.getLocation()
== ILocationAware.Location.CLIENT
.
- Specified by:
isClient
in interface ILocationAware
- Since:
- 2.0
isServer
public boolean isServer()
- Description copied from interface:
ILocationAware
- Same as
ILocationAware.getLocation()
== ILocationAware.Location.SERVER
.
- Specified by:
isServer
in interface ILocationAware
- Since:
- 2.0
getChannel
public IChannel getChannel()
- Specified by:
getChannel
in interface IProtocol<INFRA_STRUCTURE>
setChannel
public void setChannel(IChannel newChannel)
- Specified by:
setChannel
in interface IProtocol<INFRA_STRUCTURE>
getUserID
public String getUserID()
- Specified by:
getUserID
in interface IUserAware
setUserID
protected void setUserID(String userID)
handleChannelDeactivation
protected void handleChannelDeactivation()
- Since:
- 2.0
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) 2011, 2012 Eike Stepper (Berlin, Germany) and others.