Search in sources :

Example 1 with ConnectedEvent

use of io.lettuce.core.event.connection.ConnectedEvent in project lettuce-core by lettuce-io.

the class ChannelGroupListener method channelActive.

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    CommandHandler commandHandler = getCommandHandler(ctx);
    String epid = commandHandler.getEndpoint().getId();
    eventBus.publish(new ConnectedEvent(getRedisUri(ctx.channel()), epid, commandHandler.getChannelId(), local(ctx), remote(ctx)));
    channels.add(ctx.channel());
    super.channelActive(ctx);
}
Also used : ConnectedEvent(io.lettuce.core.event.connection.ConnectedEvent) CommandHandler(io.lettuce.core.protocol.CommandHandler)

Aggregations

ConnectedEvent (io.lettuce.core.event.connection.ConnectedEvent)1 CommandHandler (io.lettuce.core.protocol.CommandHandler)1