@IntegrationManagedResource public class NullChannel extends Object implements PollableChannel, BeanNameAware, IntegrationManagement, IntegrationPattern
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.IntegrationManagement.ManagementOverrides
INDEFINITE_TIMEOUT
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
NullChannel() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
String |
getBeanName() |
String |
getComponentName() |
String |
getComponentType() |
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
IntegrationManagement.ManagementOverrides |
getOverrides()
Return the overrides.
|
boolean |
isLoggingEnabled()
Return whether logging is enabled.
|
Message<?> |
receive() |
Message<?> |
receive(long timeout) |
void |
registerMetricsCaptor(MetricsCaptor registry)
Inject a
MetricsCaptor |
boolean |
send(Message<?> message) |
boolean |
send(Message<?> message,
long timeout) |
void |
setBeanName(String beanName) |
void |
setLoggingEnabled(boolean loggingEnabled)
Enable logging or not.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getManagedName, getManagedType, getThisAs, setManagedName, setManagedType
public void setBeanName(String beanName)
setBeanName
in interface BeanNameAware
public boolean isLoggingEnabled()
IntegrationManagement
isLoggingEnabled
in interface IntegrationManagement
public void setLoggingEnabled(boolean loggingEnabled)
IntegrationManagement
setLoggingEnabled
in interface IntegrationManagement
loggingEnabled
- dalse to disable.@Nullable public String getBeanName()
getBeanName
in interface NamedComponent
@Nullable public String getComponentName()
getComponentName
in interface NamedComponent
public String getComponentType()
getComponentType
in interface NamedComponent
public IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
getIntegrationPatternType
in interface IntegrationPattern
IntegrationPatternType
this component implements.public void registerMetricsCaptor(MetricsCaptor registry)
IntegrationManagement
MetricsCaptor
registerMetricsCaptor
in interface IntegrationManagement
registry
- the captor.public IntegrationManagement.ManagementOverrides getOverrides()
IntegrationManagement
getOverrides
in interface IntegrationManagement
public boolean send(Message<?> message, long timeout)
send
in interface MessageChannel
public boolean send(Message<?> message)
send
in interface MessageChannel
public Message<?> receive()
receive
in interface PollableChannel
public Message<?> receive(long timeout)
receive
in interface PollableChannel
public void destroy()
destroy
in interface DisposableBean
destroy
in interface IntegrationManagement