Java Code Examples for io.netty.channel.ChannelHandlerContext.executor()

The following are Jave code examples for showing how to use executor() of the io.netty.channel.ChannelHandlerContext class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: neoscada   File: DataModuleHandler.java   View Source Code Vote up 5 votes
@Override
public void channelActive ( final ChannelHandlerContext ctx ) throws Exception
{
    logger.debug ( "Channel active - {}", ctx );

    // we may and must remember the channel context, to know were to send notifications to
    this.ctx = ctx;

    this.source = new DataModuleMessageSource ( this.options, ctx.executor (), new ContextChannelWriter ( ctx ), this.dataModel, this.backgroundScanPeriod );
    this.messageChannel.addSource ( this.source );

    this.spontHandler = new DataListenerImpl ( this.source, new CauseOfTransmission ( StandardCause.SPONTANEOUS ) );

    super.channelActive ( ctx );
}