public void setEndpointContext(EndpointContext ctxt) {
this.endpointContext = ctxt;
}
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
HttpAdapterList adapterList = null;
if (endpointContext != null) {
if (endpointContext instanceof Component) {
adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
}
if (adapterList == null) {
for(Endpoint e : endpointContext.getEndpoints()) {
if (e.isPublished() && e != this) {
adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
assert adapterList != null;
break;
}
}
}
}
if (adapterList == null) {
adapterList = new ServerAdapterList();
}
return adapterList.createAdapter("", urlPattern, endpoint);
}