01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.endpoint;
19:
20: import javax.xml.namespace.QName;
21:
22: import org.apache.cxf.ws.addressing.EndpointReferenceType;
23:
24: /**
25: * Implementations of this interface are responsible for mapping
26: * between abstract and concrete endpoint references, and/or
27: * renewing stale references.
28: * <p>
29: * An underlying mechanism in the style of the OGSA WS-Naming
30: * specification is assumed, where an EPR maybe be fully abstract,
31: * or concrete but with sufficient information embedded to enable
32: * its renewal if necessary.
33: */
34: public interface EndpointResolver {
35: /**
36: * Retrieve a concrete EPR corresponding to the given abstract EPR,
37: * returning a cached reference if already resolved.
38: *
39: * @param logical the abstract EPR to resolve
40: * @return the resolved concrete EPR if appropriate, null otherwise
41: */
42: EndpointReferenceType resolve(EndpointReferenceType logical);
43:
44: /**
45: * Force a fresh resolution of the given abstract EPR, discarding any
46: * previously cached reference.
47: *
48: * @param logical the previously resolved abstract EPR
49: * @param physical the concrete EPR to refresh
50: * @return the renewed concrete EPR if appropriate, null otherwise
51: */
52: EndpointReferenceType renew(EndpointReferenceType logical,
53: EndpointReferenceType physical);
54:
55: /**
56: * Mint a new abstract EPR for a given service name.
57: *
58: * @param serviceName
59: * @return the newly minted EPR if appropriate, null otherwise
60: */
61: EndpointReferenceType mint(QName serviceName);
62:
63: /**
64: * Mint a new abstract EPR for a given concrete EPR
65: *
66: * @param physical
67: * @return the newly minted EPR if appropriate, null otherwise
68: */
69: EndpointReferenceType mint(EndpointReferenceType physical);
70: }
|