public EndpointMessageNotification(MuleMessage resource, ImmutableEndpoint endpoint, FlowConstruct flowConstruct, int action) { super(resource, endpoint.getEndpointURI().toString(), flowConstruct, action); this.immutableEndpoint = endpoint; }
@Override public String getConnectionDescription() { return endpoint.getEndpointURI().toString(); }
/** * Returns a string identifying the underlying resource */ public String getConnectionDescription() { return "endpoint.outbound." + endpoint.getEndpointURI().toString(); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(80); sb.append(ClassUtils.getSimpleName(this.getClass())); sb.append("{this=").append(Integer.toHexString(System.identityHashCode(this))); sb.append(", receiverKey=").append(receiverKey); sb.append(", endpoint=").append(endpoint.getEndpointURI()); sb.append('}'); return sb.toString(); }
protected static String getRecipient(ImmutableEndpoint endpoint) { // the path begins with a '/' return endpoint.getEndpointURI().getPath().substring(1); }
public Connector getOrCreateConnectorByProtocol(ImmutableEndpoint endpoint) throws TransportFactoryException { return getOrCreateConnectorByProtocol(endpoint.getEndpointURI()); }
protected String getConnectEventId() { return connector.getName() + ".receiver (" + endpoint.getEndpointURI() + ")"; }
@Override protected void doConnect() throws ConnectException { ((HttpConnector) connector).connect(endpoint.getEndpointURI()); }
@Override protected void doDisconnect() throws Exception { ((HttpConnector) connector).disconnect(endpoint.getEndpointURI()); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(80); sb.append(ClassUtils.getSimpleName(this.getClass())); sb.append("{this=").append(Integer.toHexString(System.identityHashCode(this))); sb.append(", endpoint=").append(endpoint.getEndpointURI()); sb.append(", disposed=").append(getLifecycleState().isDisposed()); sb.append('}'); return sb.toString(); }
@Deprecated public static Message routingFailedOnEndpoint(Service service, ImmutableEndpoint endpoint) { EndpointURI endpointURI = null; if (endpoint != null) { endpointURI = endpoint.getEndpointURI(); } return factory.createMessage(BUNDLE_PATH, 72, service.getName(), endpointURI); }
public static Message transformOnObjectUnsupportedTypeOfEndpoint(String name, Class<?> class1, ImmutableEndpoint endpoint) { return factory.createMessage(BUNDLE_PATH, 54, name, StringMessageUtils.toString(class1), (endpoint != null ? endpoint.getEndpointURI() : null)); }
public String getScheme(Method method) { InterfaceBinding router = routers.get(method.toString()); if (router == null) { throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString()); } return router.getEndpoint().getEndpointURI().getScheme(); }
public static Message couldNotFindStreamWithName(ImmutableEndpoint endpoint) { String address = endpoint.getEndpointURI().getAddress(); return factory.createMessage(BUNDLE_PATH, 1, address); } }
protected String getConnectEventId(ImmutableEndpoint endpoint) { return connector.getName() + ".dispatcher(" + endpoint.getEndpointURI().getUri() + ")"; }
private void init() { if (endpoint == null) { throw new IllegalArgumentException(CoreMessages.objectIsNull("Endpoint").getMessage()); } if (receiver == null && endpoint instanceof InboundEndpoint) { throw new IllegalArgumentException( "Recevier is null for Endpoint MBean but the endpoint itself is a receiving endpoint"); } name = new ObjectNameHelper(endpoint.getMuleContext()).getEndpointName(endpoint.getEndpointURI()); }
protected void warnIfMuleClientSendUsed(MuleMessage message) { final Object remoteSyncProperty = message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); if (ObjectUtils.getBoolean(remoteSyncProperty, false) && !endpoint.getExchangePattern().hasResponse()) { logger.warn("MuleClient.send() was used but inbound endpoint " + endpoint.getEndpointURI().getUri().toString() + " is not 'request-response'. No response will be returned."); } message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); }
protected MuleMessage getFirstMessage() throws Exception { // The queue from which to pull events QueueSession qs = connector.getTransactionalResource(endpoint); Queue queue = qs.getQueue(endpoint.getEndpointURI().getAddress()); return getMessage(queue, connector.getQueueTimeout()); }
protected void doConnect() throws Exception { // use the default queue profile to configure this queue. connector.getQueueProfile().configureQueue( getEndpoint().getMuleContext(), endpoint.getEndpointURI().getAddress(), connector.getQueueManager()); }
@Override protected void doConnect() throws Exception { if (!endpoint.getExchangePattern().hasResponse()) { // use the default queue profile to configure this queue. connector.getQueueProfile().configureQueue(endpoint.getMuleContext(), endpoint.getEndpointURI().getAddress(), connector.getQueueManager()); } }