3
MessageChannel
앞에 큐를 연결하려고 시도 했으므로 프로그래밍 방식으로 수행해야 osgi:listener
트리거에 대한 응답으로 런타임에이를 수행 할 수 있습니다. 지금까지 내가 가지고 : 프로그래밍 방식으로 Spring의 MessageChannel에 QueueChannel 브리징
public void addService(MessageChannel mc, Map<String,Object> properties)
{
//Create the queue and the QueueChannel
BlockingQueue<Message<?>> q = new LinkedBlockingQueue<Message<?>>();
QueueChannel qc = new QueueChannel(q);
//Create the Bridge and set the output to the input parameter channel
BridgeHandler b = new BridgeHandler();
b.setOutputChannel(mc);
//Presumably, I need something here to poll the QueueChannel
//and drop it onto the bridge. This is where I get lost
}
가 다양한 관련 클래스를 통해 찾고, 내가 해낸 :
PollerMetadata pm = new PollerMetadata();
pm.setTrigger(new IntervalTrigger(10));
PollingConsumer pc = new PollingConsumer(qc, b);
하지만 난 모두 함께 넣을 수 아니에요. 내가 뭘 놓치고 있니?