public String toString() { String address = "not set"; if(endpoint!=null) { address = endpoint.getEndpointURI().getAddress(); } return "RemoteDispatcherAgent{" + "remote-endpoint='" + address + "'" + "}"; }
private void initialise(EndpointURI endpointUri) { this.address = endpointUri.getAddress(); if (this.endpointName == null) { this.endpointName = endpointUri.getEndpointName(); } this.connectorName = endpointUri.getConnectorName(); this.transformers = endpointUri.getTransformers(); this.responseTransformers = endpointUri.getResponseTransformers(); this.params = endpointUri.getParams(); this.uri = endpointUri.getUri(); this.resourceInfo = endpointUri.getResourceInfo(); this.userInfo = endpointUri.getUserInfo(); }
public static String getEndpointNameFor(EndpointURI endpointUri) { String address = endpointUri.getAddress(); if (StringUtils.isBlank(address)) { // for some endpoints in TCK like test://xxx address = endpointUri.toString(); } // Make sure we include the endpoint scheme in the name address = (address.indexOf(":/") > -1 ? address : endpointUri.getScheme() + SEPARATOR + address); return ENDPOINT_PREFIX + SEPARATOR + replaceObjectNameChars(address); }
String contextPath = HttpConnector.normalizeUrl(receiver.getEndpointURI().getPath()); message.setProperty(HttpConnector.HTTP_CONTEXT_PATH_PROPERTY, contextPath, receiver.getEndpointURI().getAddress(), PropertyScope.INBOUND); uri.getScheme(), uri.getHost(), uri.getPort(), message.getInboundProperty(HttpConnector.HTTP_REQUEST_PATH_PROPERTY)); response = buildFailureResponse(request.getRequestLine().getHttpVersion(), HttpConstants.SC_NOT_FOUND,
if (!supportsProtocol(endpointUri.getFullScheme())) endpointUri.getFullScheme(), this.getClass()), this); props.putAll(endpointUri.getParams()); if (endpointUri.getUserInfo() != null) props.setProperty("username", endpointUri.getUser()); String passwd = endpointUri.getPassword(); if (passwd != null) String host = endpointUri.getHost(); if (host != null) props.setProperty("host", host); if (endpointUri.getPort() > -1) props.setProperty("port", String.valueOf(endpointUri.getPort()));
if ("servlet".equals(uri.getScheme())) String pathPart2 = uri.getAddress(); path = HttpConnector.normalizeUrl(uri.getPath()); requestMessage.setProperty(HttpConnector.HTTP_CONTEXT_URI_PROPERTY, receiver.getEndpointURI().getAddress(), PropertyScope.INBOUND);
public String getAddress() { EndpointURI uri = getEndpointURI(); if (uri != null) { return uri.getUri().toString(); } else { return null; } }
String contextPath = HttpConnector.normalizeUrl(getInboundEndpoint().getEndpointURI().getPath()); muleMessage.setProperty(HttpConnector.HTTP_CONTEXT_PATH_PROPERTY, contextPath, getInboundEndpoint().getEndpointURI().getAddress(), PropertyScope.INBOUND);
/** * 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()); }
protected static String getRecipient(ImmutableEndpoint endpoint) { // the path begins with a '/' return endpoint.getEndpointURI().getPath().substring(1); }
@java.lang.Override public void destroyObject(Object key, Object object) throws Exception { ImmutableEndpoint ep = (ImmutableEndpoint)key; InetAddress inetAddress; String host = ep.getEndpointURI().getHost(); if("null".equalsIgnoreCase(host)) { inetAddress = NetworkUtils.getLocalHost(); } else { inetAddress = InetAddress.getByName(host); } MulticastSocket socket = (MulticastSocket)object; socket.leaveGroup(inetAddress); super.destroyObject(key, object); }
if (!newUriString.startsWith(getEndpointURI().getFullScheme())) this.getEndpointURI().getScheme(), getEndpointURI().getScheme()), event); getEndpointURI().initialise(); return getEndpointURI();
@Override protected String getScheme() { return uriBuilder.getEndpoint().getScheme(); }
if (endpointURI != null && !newUri.getScheme().equalsIgnoreCase(endpointURI.getScheme())) CoreMessages.schemeCannotChangeForRouter(ep.getEndpointURI().getScheme(), newUri.getScheme()), event, ep); newUri.initialise();
throws TransportFactoryException String connectorName = uri.getConnectorName(); if (null != connectorName) Connector connector = getConnectorByProtocol(uri.getFullScheme()); if (connector == null) try BeanUtils.populate(connector, uri.getParams()); muleContext.getRegistry().registerConnector(connector);
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"); }
endpointURI.initialise(); if (connector != null && !connector.supportsProtocol(endpointURI.getFullScheme()))