advisor.start();
}
}
protected void fireDemandChangeEvent(boolean inDemand) {
NotificationProducer p = createPublisherNotificationProducer();
if( inDemand ) {
SubscribeDocument requestDoc = SubscribeDocument.Factory.newInstance();
Subscribe subscribe = requestDoc.addNewSubscribe();
subscribe.setTopicExpression( TopicExpressionConverter.toTopicExpression(topic) );
subscribe.setUseNotify(true);
subscribe.setConsumerReference(endpointReference);
SubscribeResponseDocument reponse = p.Subscribe(requestDoc);
} else {
UnsubscribeDocument requestDoc = UnsubscribeDocument.Factory.newInstance();
Unsubscribe unsubscribe = requestDoc.addNewUnsubscribe();
}
}