Package org.drasyl.pipeline.skeleton
Class AddressHandlerAdapter<A>
- java.lang.Object
-
- org.drasyl.pipeline.skeleton.HandlerAdapter
-
- org.drasyl.pipeline.skeleton.AddressHandlerAdapter<A>
-
- Type Parameters:
A
- the type of theAddress
.
- All Implemented Interfaces:
Handler
- Direct Known Subclasses:
SimpleInboundEventAwareHandler
,SimpleOutboundHandler
public abstract class AddressHandlerAdapter<A> extends HandlerAdapter
HandlerAdapter
which allows to explicit only handle a specific type of address.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AddressHandlerAdapter()
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
acceptAddress(Address address)
Returnstrue
if the given address should be handled,false
otherwise.-
Methods inherited from class org.drasyl.pipeline.skeleton.HandlerAdapter
eventTriggered, exceptionCaught, handlerAdded, handlerRemoved, read, write
-
-
-
-
Method Detail
-
acceptAddress
protected boolean acceptAddress(Address address)
Returnstrue
if the given address should be handled,false
otherwise.
-
-