Package septogeddon.pluginquery
Class DispatcherQueryConnection
java.lang.Object
septogeddon.pluginquery.DispatcherQueryConnection
- All Implemented Interfaces:
QueryConnection
-
Constructor Summary
ConstructorsConstructorDescriptionDispatcherQueryConnection(SocketAddress address, InjectedQueryConnection delegated) -
Method Summary
Modifier and TypeMethodDescriptionconnect()Connect to the remote addressDisconnect the connection.Get the active connection addresses from the other side of this connection as dispatcher connections, where you can send query directly to the connection without having to redirect it on this connection.Get the connection remote addressio.netty.channel.ChannelGet the channel wrapped by this connectionEvent HandlerGet the messengerMetadata StoragebooleanCheck if the connection is connectedbooleanCheck if both connection already handshaken and ready to useSend query to this connectionSend query to this connection
-
Constructor Details
-
DispatcherQueryConnection
-
-
Method Details
-
getChannel
public io.netty.channel.Channel getChannel()Description copied from interface:QueryConnectionGet the channel wrapped by this connection- Specified by:
getChannelin interfaceQueryConnection- Returns:
- Netty Channel
-
getAddress
Description copied from interface:QueryConnectionGet the connection remote address- Specified by:
getAddressin interfaceQueryConnection- Returns:
- Connection Socket Address
-
fetchActiveConnections
Description copied from interface:QueryConnectionGet the active connection addresses from the other side of this connection as dispatcher connections, where you can send query directly to the connection without having to redirect it on this connection.- Specified by:
fetchActiveConnectionsin interfaceQueryConnection- Returns:
- QueryFuture that results a set of active connection addresses
-
isConnected
public boolean isConnected()Description copied from interface:QueryConnectionCheck if the connection is connected- Specified by:
isConnectedin interfaceQueryConnection- Returns:
- true if its connected
-
isHandshaken
public boolean isHandshaken()Description copied from interface:QueryConnectionCheck if both connection already handshaken and ready to use- Specified by:
isHandshakenin interfaceQueryConnection- Returns:
- true if the connection already send a handshake packet
-
getMessenger
Description copied from interface:QueryConnectionGet the messenger- Specified by:
getMessengerin interfaceQueryConnection- Returns:
- QueryMessenger instance
-
connect
Description copied from interface:QueryConnectionConnect to the remote address- Specified by:
connectin interfaceQueryConnection- Returns:
- QueryFuture for future handling
-
disconnect
Description copied from interface:QueryConnectionDisconnect the connection. Won't get removed from connection pool, allows you to re-use this connection.- Specified by:
disconnectin interfaceQueryConnection- Returns:
- QueryFuture for future handling
-
getMetadata
Description copied from interface:QueryConnectionMetadata Storage- Specified by:
getMetadatain interfaceQueryConnection- Returns:
- the storage
-
getEventBus
Description copied from interface:QueryConnectionEvent Handler- Specified by:
getEventBusin interfaceQueryConnection- Returns:
- the event handler
-
sendQuery
Description copied from interface:QueryConnectionSend query to this connection- Specified by:
sendQueryin interfaceQueryConnection- Parameters:
channel-message-- Returns:
- QueryFuture for future handling
-
sendQuery
Description copied from interface:QueryConnectionSend query to this connection- Specified by:
sendQueryin interfaceQueryConnection- Parameters:
channel-message-queue-- Returns:
- QueryFuture for future handling
-