Class NullChannel
java.lang.Object
org.springframework.integration.channel.NullChannel
- All Implemented Interfaces:
- Aware,- BeanNameAware,- DisposableBean,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- MessageChannel,- PollableChannel
@IntegrationManagedResource
public class NullChannel
extends Object
implements PollableChannel, BeanNameAware, IntegrationManagement, IntegrationPattern
A channel implementation that essentially behaves like "/dev/null".
 All 
receive() calls will return null,
 and all send(org.springframework.messaging.Message<?>, long) calls will return true although no action is performed.
 Unless the payload of a sent message is a Publisher implementation, in
 which case the Publisher.subscribe(Subscriber) is called to initiate
 the reactive stream, although the data is discarded by this channel.
 An error thrown from a reactive stream processing (see Subscriber.onError(Throwable))
 is logged under the warn level.
 Note however that the invocations are logged at debug-level.- Author:
- Mark Fisher, Gary Russell, Artem Bilan
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.messaging.MessageChannelINDEFINITE_TIMEOUT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroy()Return a pattern type this component implements.Return the overrides.booleanReturn whether logging is enabled.Message<?> receive()Message<?> receive(long timeout) voidregisterMetricsCaptor(MetricsCaptor registry) Inject aMetricsCaptor.booleanbooleanvoidsetBeanName(String beanName) voidsetLoggingEnabled(boolean loggingEnabled) Enable logging or not.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetManagedName, getManagedType, getThisAs, isObserved, registerObservationRegistry, setManagedName, setManagedType
- 
Constructor Details- 
NullChannelpublic NullChannel()
 
- 
- 
Method Details- 
setBeanName- Specified by:
- setBeanNamein interface- BeanNameAware
 
- 
isLoggingEnabledpublic boolean isLoggingEnabled()Description copied from interface:IntegrationManagementReturn whether logging is enabled.- Specified by:
- isLoggingEnabledin interface- IntegrationManagement
- Returns:
- true if enabled.
 
- 
setLoggingEnabledpublic void setLoggingEnabled(boolean loggingEnabled) Description copied from interface:IntegrationManagementEnable logging or not.- Specified by:
- setLoggingEnabledin interface- IntegrationManagement
- Parameters:
- loggingEnabled- false to disable.
 
- 
getBeanName- Specified by:
- getBeanNamein interface- NamedComponent
 
- 
getComponentName- Specified by:
- getComponentNamein interface- NamedComponent
 
- 
getComponentType- Specified by:
- getComponentTypein interface- NamedComponent
 
- 
getIntegrationPatternTypeDescription copied from interface:IntegrationPatternReturn a pattern type this component implements.- Specified by:
- getIntegrationPatternTypein interface- IntegrationPattern
- Returns:
- the IntegrationPatternTypethis component implements.
 
- 
registerMetricsCaptorDescription copied from interface:IntegrationManagementInject aMetricsCaptor. Ignored ifObservationRegistryis provided.- Specified by:
- registerMetricsCaptorin interface- IntegrationManagement
- Parameters:
- registry- the captor.
- See Also:
 
- 
getOverridesDescription copied from interface:IntegrationManagementReturn the overrides.- Specified by:
- getOverridesin interface- IntegrationManagement
- Returns:
- the overrides.
 
- 
send- Specified by:
- sendin interface- MessageChannel
 
- 
send- Specified by:
- sendin interface- MessageChannel
 
- 
receive- Specified by:
- receivein interface- PollableChannel
 
- 
receive- Specified by:
- receivein interface- PollableChannel
 
- 
toString
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
- Specified by:
- destroyin interface- IntegrationManagement
 
 
-