private static void setExpirationFault(SynapseSubscription subscription) { subscription.setErrorCode(EventingConstants.WSE_FAULT_CODE_SENDER); subscription.setErrorSubCode("InvalidExpirationTime"); subscription.setErrorReason("The expiration time requested is invalid"); subscription.setId(null); }
private static void setExpirationFault(SynapseSubscription subscription) { setErrorCode(EventingConstants.WSE_FAULT_CODE_SENDER); setErrorSubCode("InvalidExpirationTime"); setErrorReason("The expiration time requested is invalid"); subscription.setId(null); }
public void eventSourceAdded(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was added " + "to the Synapse configuration successfully"); }
protected void setUp() throws Exception { source = new SynapseEventSource("foo"); subMan = new DefaultInMemorySubscriptionManager(); source.setSubscriptionManager(subMan); }
public SynapseSubscription() { this.setId(UIDGenerator.generateURNString()); this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE); SubscriptionData subscriptionData = new SubscriptionData(); subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false"); this.setSubscriptionData(subscriptionData); }
public void unsubscribeTest() { String message = "<wse:Unsubscribe xmlns:wse=\"http://schemas.xmlsoap.org/ws/2004/08/eventing\"/>"; try { MessageContext msgCtx = createMessageContext(message, EventingConstants.WSE_UNSUBSCRIBE); QName qname = new QName(EventingConstants.WSE_EVENTING_NS, EventingConstants.WSE_EN_IDENTIFIER, "wse"); TestUtils.addSOAPHeaderBlock(msgCtx, qname, id); source.receive(msgCtx); } catch (Exception ignored) { } try { assertEquals(0, subMan.getSubscriptions().size()); } catch (EventException e) { fail("Eventing exception occured while accessing the subscription manager"); } }
public SynapseSubscription(String deliveryMode) { this.setId(UIDGenerator.generateURNString()); this.setDeliveryMode(deliveryMode); }
public void testSubscriptionHandling() { subscribeTest(); renewTest(); unsubscribeTest(); }
public boolean mediate(MessageContext synCtx) { if (log.isDebugEnabled()) { log.debug("Mediation for Event Publisher started"); } SynapseEventSource eventSource = synCtx.getConfiguration().getEventSource(eventSourceName); eventSource.dispatchEvents(synCtx); return true; }
public void buildService(AxisConfiguration axisCfg) throws AxisFault { AxisService eventSourceService = new AxisService(); eventSourceService.setName(this.name); // Add wse operations addOperations(eventSourceService); axisCfg.addService(eventSourceService); //Set the service parameters eventSourceService .addParameter(EventingConstants.SUBSCRIPTION_MANAGER, subscriptionManager); eventSourceService.addParameter(SynapseEventingConstants.SERVICE_TYPE, SynapseEventingConstants.EVENTING_ST); }
/** * Deploys all event sources. * * @throws AxisFault if an error occurs deploying the event sources. */ private void deployEventSources() throws AxisFault { log.info("Deploying EventSources..."); for (SynapseEventSource eventSource : synapseConfiguration.getEventSources()) { eventSource.buildService(configurationContext.getAxisConfiguration()); } }
/** * Public method for event dispatching, used by the eventPublisher mediator and eventSource * * @param msgCtx message context */ public void dispatchEvents(org.apache.synapse.MessageContext msgCtx) { List<Subscription> subscribers = null; // Call event dispatcher msgCtx.getEnvironment().getExecutorService() .execute(new EventDispatcher(msgCtx)); }
public SynapseSubscription() { this.setId(UIDGenerator.generateURNString()); this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE); SubscriptionData subscriptionData = new SubscriptionData(); subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false"); this.setSubscriptionData(subscriptionData); }
public void eventSourceRemoved(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was removed " + "from the Synapse configuration successfully"); }
public SynapseSubscription(String deliveryMode) { this.setId(UIDGenerator.generateURNString()); this.setDeliveryMode(deliveryMode); } }
public void buildService(AxisConfiguration axisCfg) throws AxisFault { AxisService eventSourceService = new AxisService(); eventSourceService.setName(this.name); // Add wse operations addOperations(eventSourceService); axisCfg.addService(eventSourceService); //Set the service parameters eventSourceService .addParameter(EventingConstants.SUBSCRIPTION_MANAGER, subscriptionManager); eventSourceService.addParameter(SynapseEventingConstants.SERVICE_TYPE, SynapseEventingConstants.EVENTING_ST); }
public void eventSourceAdded(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was added " + "to the Synapse configuration successfully"); }
public void eventSourceRemoved(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was removed " + "from the Synapse configuration successfully"); }
public void eventSourceAdded(SynapseEventSource eventSource) { tracker.get(EVENT_SRC).add(eventSource.getName()); }
public void eventSourceRemoved(SynapseEventSource eventSource) { tracker.get(EVENT_SRC).remove(eventSource.getName()); }