-
Notifications
You must be signed in to change notification settings - Fork 13
/
MessageListenerContainerCoordinator.java
43 lines (37 loc) · 1.31 KB
/
MessageListenerContainerCoordinator.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.jashmore.sqs.spring.container;
import com.jashmore.sqs.container.MessageListenerContainer;
import java.util.Set;
/**
* Service that can be injected into the Spring Application to start and stop the containers that are controlling
* the consumption of queue messages.
*/
public interface MessageListenerContainerCoordinator {
/**
* Get all of the containers that have been configured with this coordinator.
*
* @return the set of containers
*/
Set<MessageListenerContainer> getContainers();
/**
* Start all of the containers that have been built for the application.
*/
void startAllContainers();
/**
* Start a container with the given identifier.
*
* @param queueIdentifier the identifier for the queue
* @throws IllegalArgumentException if there is not a container with the given identifier
*/
void startContainer(String queueIdentifier);
/**
* Stop all of the containers that have been built for the application.
*/
void stopAllContainers();
/**
* Stop a container with the given identifier.
*
* @param queueIdentifier the identifier for the queue
* @throws IllegalArgumentException if there is not a container with the given identifier
*/
void stopContainer(String queueIdentifier);
}