Package septogeddon.pluginquery.api
Interface QueryPipeline
- All Known Implementing Classes:
QueryPipelineImpl
public interface QueryPipeline
Pipeline for Query Intercepting
- Author:
- Thito Yalasatria Sunarya
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAfter
(String after, QueryChannelHandler handler) Add handler after another handlerboolean
addBefore
(String before, QueryChannelHandler handler) Add handler before another handlerboolean
addFirst
(QueryChannelHandler handler) Add handler at the first indexdefault boolean
addFirst
(QueryChannelHandler... handlers) Que Add handlers at the first indexboolean
addLast
(QueryChannelHandler handler) Add handler at the last indexdefault boolean
addLast
(QueryChannelHandler... handlers) Add handlers at the last indexvoid
dispatchActive
(QueryConnection connection) CallQueryChannelHandler.onActive(QueryConnection)
on all handlersvoid
dispatchInactive
(QueryConnection connection) CallQueryChannelHandler.onInactive(QueryConnection)
on all handlersbyte[]
dispatchReceiving
(QueryConnection connection, byte[] bytes) CallQueryChannelHandler.onReceiving(QueryConnection, byte[])
on all handlersbyte[]
dispatchSending
(QueryConnection connection, byte[] bytes) CallQueryChannelHandler.onSending(QueryConnection, byte[])
on all handlersvoid
dispatchUncaughtException
(QueryConnection connection, Throwable thrown) CallQueryChannelHandler.onCaughtException(QueryConnection, Throwable)
on all handlersfirst()
The first handler on this pipeline<T extends QueryChannelHandler>
TGet handler by nameCollection
<? extends QueryChannelHandler> getPipes()
Get all handlerslast()
The last handler on this pipelineFind the handler next to this handlerboolean
Remove handler from pipelinedefault boolean
remove
(QueryChannelHandler handler) Remove handler from pipeline
-
Method Details
-
remove
Remove handler from pipeline- Parameters:
str
-- Returns:
-
remove
Remove handler from pipeline- Parameters:
handler
-- Returns:
-
addFirst
Add handler at the first index- Parameters:
handler
-- Returns:
-
addBefore
Add handler before another handler- Parameters:
before
-handler
-- Returns:
-
addAfter
Add handler after another handler- Parameters:
after
-handler
-- Returns:
-
addLast
Add handler at the last index- Parameters:
handler
-- Returns:
-
nextHandler
Find the handler next to this handler- Parameters:
of
-- Returns:
-
first
QueryChannelHandler first()The first handler on this pipeline- Returns:
-
last
QueryChannelHandler last()The last handler on this pipeline- Returns:
-
addLast
Add handlers at the last index- Parameters:
handlers
-- Returns:
-
addFirst
Que Add handlers at the first index- Parameters:
handlers
-- Returns:
-
get
Get handler by name- Type Parameters:
T
-- Parameters:
key
-- Returns:
-
getPipes
Collection<? extends QueryChannelHandler> getPipes()Get all handlers- Returns:
-
dispatchActive
CallQueryChannelHandler.onActive(QueryConnection)
on all handlers- Parameters:
connection
-
-
dispatchInactive
CallQueryChannelHandler.onInactive(QueryConnection)
on all handlers- Parameters:
connection
-
-
dispatchSending
CallQueryChannelHandler.onSending(QueryConnection, byte[])
on all handlers- Parameters:
connection
-bytes
-- Returns:
- modified byte
-
dispatchReceiving
CallQueryChannelHandler.onReceiving(QueryConnection, byte[])
on all handlers- Parameters:
connection
-bytes
-- Returns:
- modified byte
-
dispatchUncaughtException
CallQueryChannelHandler.onCaughtException(QueryConnection, Throwable)
on all handlers- Parameters:
connection
-thrown
-
-