Interface QueryMessenger

All Known Implementing Classes:
QueryMessengerImpl

public interface QueryMessenger
HUB for active connections
Author:
Thito Yalasatria Sunarya
  • Method Details

    • newConnection

      QueryConnection newConnection(SocketAddress address)
      Prepare new connection using specified address
      Parameters:
      address -
      Returns:
    • injectConnection

      QueryConnection injectConnection(io.netty.channel.Channel channel)
      Inject served channel to handle query protocols
      Parameters:
      channel -
      Returns:
    • getActiveConnections

      Collection<? extends QueryConnection> getActiveConnections()
      Get all connections (inactive connections aren't included here, they're all goes GC'ed when you stop referring to them)
      Returns:
    • getMetadata

      QueryMetadata getMetadata()
      Get Messenger metadata
      Returns:
    • getEventBus

      QueryEventBus getEventBus()
      Event Manager that listen to all connections
      Returns:
    • getPipeline

      QueryPipeline getPipeline()
      Pipeline for all connections
      Returns:
    • getEventLoopGroup

      io.netty.channel.EventLoopGroup getEventLoopGroup()
      Netty Event Loop Group
      Returns:
    • getChannelClass

      Class<? extends io.netty.channel.Channel> getChannelClass()
      Netty Channel Class
      Returns:
    • broadcastQuery

      default boolean broadcastQuery(String channel, byte[] message)
      broadcast query to all active connections
      Parameters:
      channel -
      message -
      Returns:
      true if there is at least 1 active connection
    • broadcastQuery

      default boolean broadcastQuery(String channel, byte[] message, boolean queue)
      broadcast query to all active connections
      Parameters:
      channel -
      message -
      queue -
      Returns: