Package com.consol.citrus.actions
Class PurgeMessageChannelAction
- java.lang.Object
-
- com.consol.citrus.actions.AbstractTestAction
-
- com.consol.citrus.actions.PurgeMessageChannelAction
-
- All Implemented Interfaces:
com.consol.citrus.common.Described,com.consol.citrus.common.Named,com.consol.citrus.TestAction,com.consol.citrus.TestActorAware
public class PurgeMessageChannelAction extends com.consol.citrus.actions.AbstractTestActionAction purges all messages from a message channel instance. Message channel must be of typeQueueChannel. Action receives a list of channel objects or a list of channel names that are resolved dynamically at runtime.- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPurgeMessageChannelAction.AllAcceptingMessageSelectorSpecial message selector accepts all messages on queue channel.static classPurgeMessageChannelAction.BuilderAction builder.
-
Constructor Summary
Constructors Constructor Description PurgeMessageChannelAction(PurgeMessageChannelAction.Builder builder)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoExecute(com.consol.citrus.context.TestContext context)List<String>getChannelNames()Gets the channelNames.org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel>getChannelResolver()Gets the channelResolver.List<org.springframework.messaging.MessageChannel>getChannels()Gets the channels.org.springframework.integration.core.MessageSelectorgetMessageSelector()Gets the messageSelector.protected org.springframework.messaging.MessageChannelresolveChannelName(String channelName)Resolve the channel by name.
-
-
-
Constructor Detail
-
PurgeMessageChannelAction
public PurgeMessageChannelAction(PurgeMessageChannelAction.Builder builder)
Default constructor.
-
-
Method Detail
-
doExecute
public void doExecute(com.consol.citrus.context.TestContext context)
- Specified by:
doExecutein classcom.consol.citrus.actions.AbstractTestAction
-
resolveChannelName
protected org.springframework.messaging.MessageChannel resolveChannelName(String channelName)
Resolve the channel by name.- Parameters:
channelName- the name to resolve- Returns:
- the MessageChannel object
-
getChannelNames
public List<String> getChannelNames()
Gets the channelNames.- Returns:
- the channelNames the channelNames to get.
-
getChannels
public List<org.springframework.messaging.MessageChannel> getChannels()
Gets the channels.- Returns:
- the channels the channels to get.
-
getMessageSelector
public org.springframework.integration.core.MessageSelector getMessageSelector()
Gets the messageSelector.- Returns:
- the messageSelector the messageSelector to get.
-
getChannelResolver
public org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> getChannelResolver()
Gets the channelResolver.- Returns:
- the channelResolver the channelResolver to get.
-
-