52 *
53 * @author Jitendra Kotamraju
54 */
55 public final class ServerAdapter extends HttpAdapter implements BoundEndpoint {
56 final String name;
57
58 protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) {
59 super(endpoint, owner, urlPattern);
60 this.name = name;
61 // registers itself with the container
62 Module module = endpoint.getContainer().getSPI(Module.class);
63 if(module==null)
64 LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}",
65 new Object[]{endpoint.getContainer(), Module.class});
66 else {
67 module.getBoundEndpoints().add(this);
68 }
69 }
70
71 /**
72 * Gets the name of the endpoint as given in the <tt>sun-jaxws.xml</tt>
73 * deployment descriptor.
74 */
75 public String getName() {
76 return name;
77 }
78
79
80 @Override
81 public @NotNull URI getAddress() {
82 WebModule webModule = endpoint.getContainer().getSPI(WebModule.class);
83 if(webModule==null)
84 // this is really a bug in the container implementation
85 throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class);
86
87 return getAddress(webModule.getContextPath());
88 }
89
90 @Override
91 public @NotNull URI getAddress(String baseAddress) {
92 String adrs = baseAddress+getValidPath();
|
52 *
53 * @author Jitendra Kotamraju
54 */
55 public final class ServerAdapter extends HttpAdapter implements BoundEndpoint {
56 final String name;
57
58 protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) {
59 super(endpoint, owner, urlPattern);
60 this.name = name;
61 // registers itself with the container
62 Module module = endpoint.getContainer().getSPI(Module.class);
63 if(module==null)
64 LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}",
65 new Object[]{endpoint.getContainer(), Module.class});
66 else {
67 module.getBoundEndpoints().add(this);
68 }
69 }
70
71 /**
72 * Gets the name of the endpoint as given in the {@code sun-jaxws.xml}
73 * deployment descriptor.
74 */
75 public String getName() {
76 return name;
77 }
78
79
80 @Override
81 public @NotNull URI getAddress() {
82 WebModule webModule = endpoint.getContainer().getSPI(WebModule.class);
83 if(webModule==null)
84 // this is really a bug in the container implementation
85 throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class);
86
87 return getAddress(webModule.getContextPath());
88 }
89
90 @Override
91 public @NotNull URI getAddress(String baseAddress) {
92 String adrs = baseAddress+getValidPath();
|