public EndpointURI getEndpointURI() { if (dynamicEndpointURI != null) { return dynamicEndpointURI; } else { return endpoint.getEndpointURI(); } }
/** * The method determines the key used to store the receiver against. * * @param endpoint the endpoint being registered for the service * @return the key to store the newly created receiver against */ @Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { String key = endpoint.getEndpointURI().toString(); int i = key.indexOf('?'); if (i > -1) { key = key.substring(0, i); } return key; }
public String toString() { String address = "not set"; if(endpoint!=null) { address = endpoint.getEndpointURI().getAddress(); } return "RemoteDispatcherAgent{" + "remote-endpoint='" + address + "'" + "}"; }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { EndpointURI uri = endpoint.getEndpointURI(); return uri.getAddress(); }
protected Credentials extractCredentials(InboundEndpoint endpoint) { if (null != endpoint && null != endpoint.getEndpointURI() && null != endpoint.getEndpointURI().getUserInfo()) { final String userName = endpoint.getEndpointURI().getUser(); final String password = endpoint.getEndpointURI().getPassword(); if (password != null && userName != null) { return new MuleCredentials(userName, password.toCharArray()); } } return null; }
/** * The method determines the key used to store the receiver against. * * @param flowConstruct the service for which the endpoint is being registered * @param endpoint the endpoint being registered for the service * @return the key to store the newly created receiver against */ protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { return StringUtils.defaultIfEmpty(endpoint.getEndpointURI().getFilterAddress(), endpoint.getEndpointURI().getAddress()); }
private static String getEndpointDescription(InboundEndpoint endpoint) { String endpointString = endpoint.getName(); if (endpointString == null) { endpointString = endpoint.getEndpointURI().getUri().toString(); } return endpointString; }
public RmiCallbackMessageReceiver(Connector connector, FlowConstruct flowConstruct, InboundEndpoint endpoint) throws CreateException { super(connector, flowConstruct, endpoint); this.connector = (RmiConnector) connector; logger.debug("Initializing with endpoint " + endpoint); String rmiPolicyPath = this.connector.getSecurityPolicy(); System.setProperty("java.security.policy", rmiPolicyPath); EndpointURI endpointUri = endpoint.getEndpointURI(); port = endpointUri.getPort(); if (port < 1) { port = RmiConnector.DEFAULT_RMI_muleRegistry_PORT; } logger.debug("Initialized successfully"); }
private String getReplyTo() { InboundEndpoint endpoint = ((InboundEndpoint) replyMessageSource); return endpoint.getConnector().getCanonicalURI(endpoint.getEndpointURI()); }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { return flowConstruct.getName() + "~" + endpoint.getEndpointURI().getAddress(); }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { return endpoint.getEndpointURI().getAddress() + "/" + flowConstruct.getName(); } }
/** * Should be a 1 line description of the agent */ public String getDescription() { return getName() + ": accepting connections on " + endpoint.getEndpointURI().getAddress(); }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { //you can have multiple Multicast sockets bound to a single port, // so store listeners with the service name too return endpoint.getEndpointURI().getAddress() + "/" + flowConstruct.getName(); } }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { { return defaultIfEmpty(endpoint.getName(), endpoint.getEndpointURI().getAddress()); } }
@Override protected Object getReceiverKey(FlowConstruct flowConstruct, InboundEndpoint endpoint) { if (endpoint.getFilter() != null && endpoint.getFilter() instanceof FilenameWildcardFilter) { return endpoint.getEndpointURI().getAddress() + "/" + ((FilenameWildcardFilter) endpoint.getFilter()).getPattern(); } return endpoint.getEndpointURI().getAddress(); }
protected String getReceiverKey(MessageReceiver receiver) { String key = receiver.getEndpoint().getEndpointURI().getPath(); if(StringUtils.isEmpty(key)) { key = "/"; } return key; }
public MuleEvent process(MuleEvent event) throws MuleException { // If the endpoint has a logical name, use it, otherwise use the URI. String inboundEndpoint = endpoint.getName(); if (StringUtils.isBlank(inboundEndpoint)) { // URI inboundEndpoint = endpoint.getEndpointURI().getUri().toString(); } event.getMessage().setProperty(MuleProperties.MULE_ORIGINATING_ENDPOINT_PROPERTY, inboundEndpoint, PropertyScope.INBOUND); return event; }
protected void warnIfMuleClientSendUsed(MuleMessage message) { final Object remoteSyncProperty = message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); if (ObjectUtils.getBoolean(remoteSyncProperty, false) && !messageReceiver.getEndpoint().getExchangePattern().hasResponse()) { logger.warn("MuleClient.send() was used but inbound endpoint " + messageReceiver.getEndpoint().getEndpointURI().getUri().toString() + " is not 'request-response'. No response will be returned."); } message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); }
@Override protected MuleMessage createMessageFromSource(Object message) throws MuleException { MuleMessage muleMessage = super.createMessageFromSource(message); String contextPath = HttpConnector.normalizeUrl(getInboundEndpoint().getEndpointURI().getPath()); muleMessage.setProperty(HttpConnector.HTTP_CONTEXT_PATH_PROPERTY, contextPath, PropertyScope.INBOUND); return muleMessage; }
@Override public MessageReceiver createReceiver(FlowConstruct flowConstruct, InboundEndpoint endpoint) throws Exception { if (!endpoint.getExchangePattern().hasResponse()) { queueProfile.configureQueue(endpoint.getMuleContext(), endpoint.getEndpointURI().getAddress(), getQueueManager()); } return serviceDescriptor.createMessageReceiver(this, flowConstruct, endpoint); }