Package septogeddon.pluginquery.api
Interface QueryMessenger
- All Known Implementing Classes:
QueryMessengerImpl
public interface QueryMessenger
HUB for active connections
- Author:
- Thito Yalasatria Sunarya
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanbroadcastQuery(String channel, byte[] message) broadcast query to all active connectionsdefault booleanbroadcastQuery(String channel, byte[] message, boolean queue) broadcast query to all active connectionsCollection<? extends QueryConnection> Get all connections (inactive connections aren't included here, they're all goes GC'ed when you stop referring to them)Class<? extends io.netty.channel.Channel> Netty Channel ClassEvent Manager that listen to all connectionsio.netty.channel.EventLoopGroupNetty Event Loop GroupGet Messenger metadataPipeline for all connectionsinjectConnection(io.netty.channel.Channel channel) Inject served channel to handle query protocolsnewConnection(SocketAddress address) Prepare new connection using specified address
-
Method Details
-
newConnection
Prepare new connection using specified address- Parameters:
address-- Returns:
-
injectConnection
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
broadcast query to all active connections- Parameters:
channel-message-- Returns:
- true if there is at least 1 active connection
-
broadcastQuery
broadcast query to all active connections- Parameters:
channel-message-queue-- Returns:
-