public RmiMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (RmiConnector)endpoint.getConnector(); }
public VMMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (VMConnector) endpoint.getConnector(); }
public ProcessMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (ProcessConnector)endpoint.getConnector(); }
public Connector getConnector() { return endpoint.getConnector(); }
@Override public Connector getConnector() { return realEndpoint.getConnector(); }
public TcpMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (TcpConnector) endpoint.getConnector(); }
public UdpMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (UdpConnector)endpoint.getConnector(); }
public FileMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (FileConnector) endpoint.getConnector(); if (endpoint.getProperty("outputAppend") != null) { throw new IllegalArgumentException("Configuring 'outputAppend' on a file endpoint is no longer supported. You may configure it on a file connector instead."); } }
/** * @deprecated as of 3.7.2. Use {@link #dispatchNotification(EndpointMessageNotification, MuleEvent)} instead */ @Deprecated public void dispatchNotification(EndpointMessageNotification notification) { AbstractConnector connector = (AbstractConnector) endpoint.getConnector(); if (notification != null && connector.isEnableMessageEvents()) { connector.fireNotification(notification); } }
public void dispatchNotification(EndpointMessageNotification notification, MuleEvent event) { AbstractConnector connector = (AbstractConnector) endpoint.getConnector(); if (notification != null && connector.isEnableMessageEvents(event)) { connector.fireNotification(notification, event); } }
public XmppMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); xmppConnector = (XmppConnector) endpoint.getConnector(); conversation = xmppConnector.getConversationFactory().create(endpoint); }
public StdioMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.connector = (StdioConnector) endpoint.getConnector(); // apply connector-specific properties if (connector instanceof PromptStdioConnector) { PromptStdioConnector ssc = (PromptStdioConnector)connector; String outputMessage = (String) endpoint.getProperties().get("outputMessage"); if (outputMessage != null) { ssc.setOutputMessage(outputMessage); } } }
/** Override this method to change the default MessageProcessors. */ protected List<MessageProcessor> createOutboundMessageProcessors(OutboundEndpoint endpoint) throws MuleException { Connector connector = endpoint.getConnector(); List<MessageProcessor> list = new ArrayList<MessageProcessor>(); // Log but don't proceed if connector is not started list.add(new OutboundLoggingMessageProcessor()); list.add(new ProcessIfStartedMessageProcessor(connector, connector.getLifecycleState())); // Everything is processed within ExecutionTemplate list.add(new EndpointTransactionalInterceptingMessageProcessor(endpoint.getTransactionConfig())); list.add(new OutboundEventTimeoutMessageProcessor()); list.add(new OutboundSessionHandlerMessageProcessor(connector.getSessionHandler())); list.add(new OutboundEndpointPropertyMessageProcessor(endpoint)); list.add(new OutboundRootMessageIdPropertyMessageProcessor()); list.add(new OutboundResponsePropertiesMessageProcessor(endpoint)); list.add(new OutboundEndpointMimeTypeCheckingMessageProcessor(endpoint)); return list; }
public HttpClientMessageDispatcher(OutboundEndpoint endpoint) { super(endpoint); this.httpConnector = (HttpConnector) endpoint.getConnector(); List<Transformer> ts = httpConnector.getDefaultOutboundTransformers(null); if (ts.size() == 1) { this.sendTransformer = ts.get(0); } else if (ts.size() == 0) { this.sendTransformer = new ObjectToHttpClientMethodRequest(); this.sendTransformer.setMuleContext(getEndpoint().getMuleContext()); this.sendTransformer.setEndpoint(endpoint); } else { this.sendTransformer = new TransformerChain(ts); } }
if (!endpoint.getConnector().isStarted()) && (e.getSource()).equals(endpoint.getConnector()))
public EndpointMessageNotification createBeginNotification(MuleEvent event) { AbstractConnector connector = (AbstractConnector) endpoint.getConnector(); if (connector.isEnableMessageEvents(event)) { int notificationAction; if (endpoint.getExchangePattern().hasResponse()) { notificationAction = EndpointMessageNotification.MESSAGE_SEND_BEGIN; } else { notificationAction = EndpointMessageNotification.MESSAGE_DISPATCH_BEGIN; } return new EndpointMessageNotification(event.getMessage(), endpoint, event.getFlowConstruct(), notificationAction); } return null; }
if (!supportsProtocol(endpoint.getConnector().getProtocol()))
public MuleEvent process(MuleEvent event) throws MuleException { AbstractConnector connector = (AbstractConnector) endpoint.getConnector(); if (connector.isEnableMessageEvents(event)) { int notificationAction; if (endpoint.getExchangePattern().hasResponse()) { notificationAction = EndpointMessageNotification.MESSAGE_SEND_END; } else { notificationAction = EndpointMessageNotification.MESSAGE_DISPATCH_END; } dispatchNotification(new EndpointMessageNotification(event.getMessage(), endpoint, event.getFlowConstruct(), notificationAction), event); } return event; }
private void setTransactionFactoriesIfNeeded(InboundEndpoint inboundEndpoint, OutboundEndpoint outboundEndpoint) throws MuleException { String inboundProtocol = inboundEndpoint.getConnector().getProtocol(); String outboundProtocol = outboundEndpoint.getConnector().getProtocol(); boolean needXA = !inboundProtocol.equals(outboundProtocol); TransactionConfig inboundTransactionConfig = inboundEndpoint.getTransactionConfig(); if (inboundTransactionConfig.getFactory() == null) { TransactionFactory transactionFactory = needXA ? new XaTransactionFactory() : getTransactionFactory(inboundProtocol); inboundTransactionConfig.setFactory(transactionFactory); } TransactionConfig outboundTransactionConfig = outboundEndpoint.getTransactionConfig(); if (outboundTransactionConfig.getFactory() == null) { TransactionFactory transactionFactory = needXA ? new XaTransactionFactory() : getTransactionFactory(outboundProtocol); outboundTransactionConfig.setFactory(transactionFactory); } }