Package org.jboss.as.remoting
Class AbstractChannelOpenListenerService
- java.lang.Object
-
- org.jboss.as.remoting.AbstractChannelOpenListenerService
-
- All Implemented Interfaces:
org.jboss.msc.Service,org.jboss.remoting3.OpenListener
public abstract class AbstractChannelOpenListenerService extends Object implements org.jboss.msc.Service, org.jboss.remoting3.OpenListener
Abstract service responsible for listening for channel open requests.- Author:
- Kabir Khan, Emanuel Muckenhuber, Richard Opalka
-
-
Field Summary
Fields Modifier and Type Field Description protected static intCHANNEL_SHUTDOWN_TIMEOUTHow long we wait for active operations to clear before allowing channel close to proceedprotected StringchannelName
-
Constructor Summary
Constructors Constructor Description AbstractChannelOpenListenerService(Supplier<org.jboss.remoting3.Endpoint> endpointSupplier, Supplier<ManagementChannelRegistryService> registrySupplier, String channelName, org.xnio.OptionMap optionMap)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidchannelOpened(org.jboss.remoting3.Channel channel)protected abstract voidexecute(Runnable runnable)Execute the shutdown task.protected abstract org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandlehandleChannelOpened(org.jboss.remoting3.Channel channel)Handle a channel open event.voidregistrationTerminated()voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Field Detail
-
CHANNEL_SHUTDOWN_TIMEOUT
protected static final int CHANNEL_SHUTDOWN_TIMEOUT
How long we wait for active operations to clear before allowing channel close to proceed
-
channelName
protected final String channelName
-
-
Constructor Detail
-
AbstractChannelOpenListenerService
public AbstractChannelOpenListenerService(Supplier<org.jboss.remoting3.Endpoint> endpointSupplier, Supplier<ManagementChannelRegistryService> registrySupplier, String channelName, org.xnio.OptionMap optionMap)
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service
-
channelOpened
public void channelOpened(org.jboss.remoting3.Channel channel)
- Specified by:
channelOpenedin interfaceorg.jboss.remoting3.OpenListener
-
registrationTerminated
public void registrationTerminated()
- Specified by:
registrationTerminatedin interfaceorg.jboss.remoting3.OpenListener
-
handleChannelOpened
protected abstract org.jboss.as.protocol.mgmt.support.ManagementChannelShutdownHandle handleChannelOpened(org.jboss.remoting3.Channel channel)
Handle a channel open event.- Parameters:
channel- the opened channel- Returns:
- the shutdown handle
-
execute
protected abstract void execute(Runnable runnable)
Execute the shutdown task.- Parameters:
runnable- the runnable
-
-