Package org.drasyl.pipeline
Class AddressHandlerAdapter<A>
java.lang.Object
org.drasyl.pipeline.HandlerAdapter
org.drasyl.pipeline.AddressHandlerAdapter<A>
- Type Parameters:
A
- the type of theAddress
.
- All Implemented Interfaces:
Handler
- Direct Known Subclasses:
SimpleInboundHandler
,SimpleOutboundHandler
HandlerAdapter
which allows to explicit only handle a specific type of address.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create a new instance which will try to detect the types to match out of the type parameter of the class.protected
AddressHandlerAdapter
(Class<? extends A> addressType) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptAddress
(Address address) Returnstrue
if the given address should be handled,false
otherwise.Methods inherited from class org.drasyl.pipeline.HandlerAdapter
eventTriggered, exceptionCaught, handlerAdded, handlerRemoved, read, write
-
Constructor Details
-
AddressHandlerAdapter
protected AddressHandlerAdapter()Create a new instance which will try to detect the types to match out of the type parameter of the class. -
AddressHandlerAdapter
Create a new instance- Parameters:
addressType
- the type of messages to match
-
-
Method Details
-
acceptAddress
Returnstrue
if the given address should be handled,false
otherwise.
-