Class CompositeStreamsInterceptor
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.interceptors.CompositeStreamsInterceptor
-
- All Implemented Interfaces:
StreamsExecutionEnvironmentAware
,StreamsLifecycleInterceptor
public class CompositeStreamsInterceptor extends Object implements StreamsLifecycleInterceptor, StreamsExecutionEnvironmentAware
-
-
Constructor Summary
Constructors Constructor Description CompositeStreamsInterceptor()
Creates a newCompositeStreamsInterceptor
instance.CompositeStreamsInterceptor(Collection<StreamsLifecycleInterceptor> interceptors)
Creates a newCompositeStreamsInterceptor
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInterceptors(Collection<StreamsLifecycleInterceptor> interceptors)
String
name()
The Interceptor name is mostly used for logging information.void
onStart(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being started.void
onStop(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being stopped.void
setExecutionEnvironment(StreamsExecutionEnvironment<?> environment)
Set theStreamsExecutionEnvironment
.
-
-
-
Constructor Detail
-
CompositeStreamsInterceptor
public CompositeStreamsInterceptor()
Creates a newCompositeStreamsInterceptor
instance.
-
CompositeStreamsInterceptor
public CompositeStreamsInterceptor(Collection<StreamsLifecycleInterceptor> interceptors)
Creates a newCompositeStreamsInterceptor
instance.- Parameters:
interceptors
- the list of interceptors.
-
-
Method Detail
-
addInterceptors
public void addInterceptors(Collection<StreamsLifecycleInterceptor> interceptors)
-
onStart
public void onStart(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being started.- Specified by:
onStart
in interfaceStreamsLifecycleInterceptor
chain
- theStreamsLifecycleChain
instance.
-
onStop
public void onStop(StreamsLifecycleContext context, StreamsLifecycleChain chain)
Intercepts the streams instance before being stopped.- Specified by:
onStop
in interfaceStreamsLifecycleInterceptor
chain
- theStreamsLifecycleChain
instance.
-
setExecutionEnvironment
public void setExecutionEnvironment(StreamsExecutionEnvironment<?> environment)
Set theStreamsExecutionEnvironment
.- Specified by:
setExecutionEnvironment
in interfaceStreamsExecutionEnvironmentAware
- Parameters:
environment
- theStreamsExecutionEnvironment
instance
-
name
public String name()
The Interceptor name is mostly used for logging information.- Specified by:
name
in interfaceStreamsLifecycleInterceptor
- Returns:
- the name of this interceptor.
-
-