cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eoghan Glynn (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-400) Pluggable mechanism for resolution/lookup/mapping of EPRs
Date Thu, 01 Feb 2007 14:51:05 GMT
Pluggable mechanism for resolution/lookup/mapping of EPRs
---------------------------------------------------------

                 Key: CXF-400
                 URL: https://issues.apache.org/jira/browse/CXF-400
             Project: CXF
          Issue Type: Task
            Reporter: Eoghan Glynn
         Assigned To: Eoghan Glynn


The idea is to support pluggable resolution/lookup/mapping of EPRs. 

For example EPRs could be looked up in some external repository to allow for refreshed metadata
to be pushed out to clients. Each resolution/lookup/mapping component would simply register
a EndpointResolver with the registry, which then walks the list of registered resolvers when
an EPR needs to be resolved or freshed.

The EndpointResolverRegistry sould be registered as a spring-loaded Bus extension.

The following psuedo-code could act as a first cut of the relevant APIs.

public interface EndpointResolverRegistry {
   /**
    * Register an endpoint resolver.
    *
    * @param resolver the EndpointResolver to add to the chain.
    */
   void resigterResolver(EndpointResolver resolver);

   /**
    * Walk the list of registered EndpointResolvers, so as to
    * retrieve a concrete EPR corresponding to the given abstract EPR,
    * returning a cached reference if already resolved.
    * <p>
    * This API is used by any actor that requires a concrete EPR (e.g.
    * a transport-level Conduit), and must be called each and every
    * time the EPR content is to be accessed (e.g. before each connection
    * establishment attempt). 
    *
    * @param abstract the abstract EPR to resolve
    */
   EndpointReferenceType resolve(EndpointReferenceType abstract);

   /**
    * Walk the list of registered EndpointResolvers, so as to force a fresh 
    * resolution of the given abstract EPR, discarding any previously cached 
    * reference.
    * <p>
    * This API may be used by say the transport-level Conduit when it
    * detects a non-transient error on the outgoing connection, or
    * by any other actor in the dispatch with the ability to infer
    * server-side unavailability.
    * 
    * @param abstract the previously resolved abstract EPR
    * @param concrete the concrete EPR to refresh
    * @return the refreshed concrete EPR if appropriate, null otherwise
    */
   EndpointReferenceType refresh(EndpointReferenceType abstract, EndpointReferenceType concrete);
}

public interface EndpointResolver {   
   /**
    * Retrieve a concrete EPR corresponding to the given abstract EPR,
    * returning a cached reference if already resolved.
    *
    * @param abstract the abstract EPR to resolve
    * @return the resolved concrete EPR if appropriate, null otherwise
    */
   EndpointReferenceType resolve(EndpointReferenceType abstract);

   /**
    * Force a fresh resolution of the given abstract EPR, discarding any
    * previously cached reference.
    *
    * @param abstract the previously resolved abstract EPR
    * @param concrete the concrete EPR to refresh
    * @return the refreshed concrete EPR if appropriate, null otherwise
    */
   EndpointReferenceType refresh(EndpointReferenceType concrete, EndpointReferenceType concrete);
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message