/** * Returns a list of EndpointReferences that have a URI that matches a given URI * @param uri - the URI to match * @return a List of EndpointReferences that match the supplied URI - if there are none * an *empty* list is returned (not null) */ public List<EndpointReference> findEndpointReferences( String uri ) { List<EndpointReference> theRefs = new ArrayList<EndpointReference>(); if( uri == null ) return theRefs; for( EndpointReference ref : endpointreferences ) { if( uri.equals(ref.getURI()) ) theRefs.add(ref); } // end for return theRefs; } // end method findEndpointReference
/** * Returns a list of EndpointReferences that have a URI that matches a given URI * @param uri - the URI to match * @return a List of EndpointReferences that match the supplied URI - if there are none * an *empty* list is returned (not null) */ public List<EndpointReference> findEndpointReferences( String uri ) { List<EndpointReference> theRefs = new ArrayList<EndpointReference>(); if( uri == null ) return theRefs; for( EndpointReference ref : endpointreferences ) { if( uri.equals(ref.getURI()) ) theRefs.add(ref); } // end for return theRefs; } // end method findEndpointReference
protected String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
protected String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
private String getContext() { if (subject instanceof Endpoint) { Endpoint endpoint = (Endpoint)subject; return endpoint.getURI(); } else if (subject instanceof EndpointReference) { EndpointReference endpointReference = (EndpointReference)subject; return endpointReference.getURI(); } else if (subject instanceof Component) { Component component = (Component)subject; return component.getURI(); } return null; }
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); requestEndpoint = retrieveEndpoint(endpointURI); responseEndpointReference = retrieveEndpointReference(endpointReferenceURI); messageFactory = getMessageFactory(); if (responseTargetAddress instanceof EndpointReference){ // fix the target as in this case it will be an EPR EndpointReference epr = (EndpointReference)responseTargetAddress; responseTargetAddress = (T)retrieveEndpointReference(epr.getURI()); } // end if } // end method readObject
/** * Find the actual EndpointReference in the DomainRegistry which corresponds to the configuration described * in a deserialized EndpointReference * @param ep The deserialized endpointReference * @param registry - the main extension point Registry * @return the corresponding EndpointReference from the DomainRegistry, or null if no match can be found */ private RuntimeEndpointReferenceImpl findActualEPR(RuntimeEndpointReferenceImpl epr, ExtensionPointRegistry registry) { // Get the DomainRegistry DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); if( domainRegistryFactory == null ) return null; // TODO: For the moment, just use the first (and only!) DomainRegistry... DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; if( domainRegistry == null ) return null; for( EndpointReference epReference : domainRegistry.getEndpointReferences() ) { // TODO: For the present, simply return the first matching endpointReference if( epReference.getURI().equals(epr.getURI()) ) { return (RuntimeEndpointReferenceImpl) epReference; } // end if } // end for return null; } // end method findActualEPR