endpoint = createEndpointFromUri(uri, type);
endpoint = createEndpointFromUri(new MuleEndpointURI(uriIdentifier), type); } else { if (endpoint.getType().equals(UMOEndpoint.ENDPOINT_TYPE_SENDER_AND_RECEIVER)) { endpoint.setType(type); } else if (!endpoint.getType().equals(type)) { throw new IllegalArgumentException("Endpoint matching: " + uriIdentifier + " is not of type: " + type + ". It is of type: " + endpoint.getType());  }
    public static UMOEndpoint getOrCreateEndpointForUri(UMOEndpointURI uri, String type) throws UMOException    {        UMOEndpoint endpoint = getEndpointFromUri(uri);        if (endpoint == null) {            endpoint = createEndpointFromUri(uri, type);        }        return endpoint;    }