Package com.mindscapehq.raygun4java.core
Class AbstractRaygunSendEventChainFactory<T extends IRaygunSentEvent>
- java.lang.Object
-
- com.mindscapehq.raygun4java.core.AbstractRaygunSendEventChainFactory<T>
-
- Type Parameters:
T- is either IRaygunOnBeforeSend or IRaygunOnAfterSend
- Direct Known Subclasses:
RaygunOnAfterSendChainFactory,RaygunOnBeforeSendChainFactory,RaygunOnFailedSendChainFactory
public abstract class AbstractRaygunSendEventChainFactory<T extends IRaygunSentEvent> extends Object
This is a factory base class that can create the likes of RaygunOnBeforeSendChain or RaygunOnAfterSendChain OnBefore event handler chains and OnAfter event handler chains are so similar they can both be created by this class. Main methods: .beforeAll(firstFilterFactory) will set a factory to create a filter to be run before the main filters .withFilterFactory(filterFactory) will add a factory to a list that will create a filter that will be run as a main filter .afterAll(lastFilterFactory) will set a factory to create a filter to be run after the main filters .create() will use all the factories to create an implementation that is used by a single RaygunClient instance
-
-
Constructor Summary
Constructors Constructor Description AbstractRaygunSendEventChainFactory()AbstractRaygunSendEventChainFactory(List<IRaygunSendEventFactory<T>> handlers)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbstractRaygunSendEventChainFactory<T>afterAll(IRaygunSendEventFactory<T> lastFilter)AbstractRaygunSendEventChainFactory<T>beforeAll(IRaygunSendEventFactory<T> firstFilter)Tcreate()protected abstract Tcreate(List<T> handlers)IRaygunSendEventFactorygetFirstFilterFactory()List<IRaygunSendEventFactory<T>>getHandlersFactory()IRaygunSendEventFactorygetLastFilterFactory()voidsetFirstFilterFactory(IRaygunSendEventFactory<T> firstFilterFactory)voidsetHandlersFactory(List<IRaygunSendEventFactory<T>> handlersFactory)voidsetLastFilterFactory(IRaygunSendEventFactory<T> lastFilterFactory)AbstractRaygunSendEventChainFactory<T>withFilterFactory(IRaygunSendEventFactory<T> handler)
-
-
-
Constructor Detail
-
AbstractRaygunSendEventChainFactory
public AbstractRaygunSendEventChainFactory()
-
AbstractRaygunSendEventChainFactory
public AbstractRaygunSendEventChainFactory(List<IRaygunSendEventFactory<T>> handlers)
-
-
Method Detail
-
create
public T create()
-
withFilterFactory
public AbstractRaygunSendEventChainFactory<T> withFilterFactory(IRaygunSendEventFactory<T> handler)
- Parameters:
handler- adds handler factory to the main handler factory list- Returns:
- this
-
beforeAll
public AbstractRaygunSendEventChainFactory<T> beforeAll(IRaygunSendEventFactory<T> firstFilter)
- Parameters:
firstFilter- Sets a single specific filter factory before the other filter factories- Returns:
- this
-
afterAll
public AbstractRaygunSendEventChainFactory<T> afterAll(IRaygunSendEventFactory<T> lastFilter)
- Parameters:
lastFilter- Set a single specific filter factory after the other filter factories- Returns:
- this
-
getHandlersFactory
public List<IRaygunSendEventFactory<T>> getHandlersFactory()
-
setHandlersFactory
public void setHandlersFactory(List<IRaygunSendEventFactory<T>> handlersFactory)
-
getLastFilterFactory
public IRaygunSendEventFactory getLastFilterFactory()
-
setLastFilterFactory
public void setLastFilterFactory(IRaygunSendEventFactory<T> lastFilterFactory)
-
getFirstFilterFactory
public IRaygunSendEventFactory getFirstFilterFactory()
-
setFirstFilterFactory
public void setFirstFilterFactory(IRaygunSendEventFactory<T> firstFilterFactory)
-
-