Methods Summary |
---|
private void | addToRegistry(java.lang.String contextRoot, java.lang.String urlPattern, WSEndpointDescriptor wsDescriptor)
contextRoot = ensureSlash(contextRoot);
urlPattern = ensureSlash(urlPattern);
Map<String, WSEndpointDescriptor> endpointMap = registry.get(contextRoot);
if (endpointMap == null) {
endpointMap = new HashMap<String, WSEndpointDescriptor>();
registry.put(contextRoot, endpointMap);
}
endpointMap.put(urlPattern, wsDescriptor);
|
protected void | deregisterEndpoint(com.sun.enterprise.webservice.monitoring.Endpoint endpoint)Deregister WS Endpoint
final WebServiceEndpoint wsServiceDescriptor = endpoint.getDescriptor();
final String contextRoot = getEndpointContextRoot(wsServiceDescriptor);
final String urlPattern = getEndpointUrlPattern(wsServiceDescriptor);
// ContextRoot could be represented as leading slash or without (GF API changes from time to time)
// So we use slashed version for registries
final String slashedContextRoot = ensureSlash(contextRoot);
final String slashedUrlPattern = ensureSlash(urlPattern);
final String path = slashedContextRoot + slashedUrlPattern;
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, MessagesMessages.WSTCP_1111_APP_SERV_REG_DEREGISTER_ENDPOINT(
wsServiceDescriptor.getWebService().getName(),
path, wsServiceDescriptor.implementedByEjbComponent()));
}
removeFromRegistry(slashedContextRoot, slashedUrlPattern);
WSTCPAdapterRegistryImpl.getInstance().deleteTargetFor(path);
|
private java.lang.String | ensureSlash(java.lang.String s)
if (s != null && s.length() > 0 && s.charAt(0) != '/") {
return "/" + s;
}
return s;
|
public WSEndpointDescriptor | get(java.lang.String wsServiceName, java.lang.String endpointName)Lookup endpoint's decriptor in registry
final Map<String, WSEndpointDescriptor> endpointMap = registry.get(wsServiceName);
if (endpointMap != null) {
return endpointMap.get(endpointName);
}
return null;
|
public com.sun.enterprise.webservice.EjbRuntimeEndpointInfo | getEjbRuntimeEndpointInfo(java.lang.String service, java.lang.String endpointName)Method is used by WS invoker to clear some EJB invoker state ???
final WSEndpointDescriptor wsEndpointDescriptor = get(service, endpointName);
EjbRuntimeEndpointInfo endpointInfo = null;
if (wsEndpointDescriptor.isEJB()) {
endpointInfo = (EjbRuntimeEndpointInfo) WebServiceEjbEndpointRegistry.
getRegistry().getEjbWebServiceEndpoint(wsEndpointDescriptor.getURI(), "POST", null);
}
return endpointInfo;
|
private java.lang.String | getEndpointContextRoot(com.sun.enterprise.deployment.WebServiceEndpoint wsServiceDescriptor)
String contextRoot;
if(!wsServiceDescriptor.implementedByEjbComponent()) {
contextRoot = wsServiceDescriptor.getWebComponentImpl().
getWebBundleDescriptor().getContextRoot();
logger.log(Level.FINE, MessagesMessages.WSTCP_1112_APP_SERV_REG_GET_ENDP_CR_NON_EJB(contextRoot));
} else {
final String[] path = wsServiceDescriptor.getEndpointAddressUri().split("/");
contextRoot = "/" + path[1];
logger.log(Level.FINE, MessagesMessages.WSTCP_1113_APP_SERV_REG_GET_ENDP_CR_EJB(contextRoot));
}
return contextRoot;
|
private java.lang.String | getEndpointUrlPattern(com.sun.enterprise.deployment.WebServiceEndpoint wsServiceDescriptor)
String urlPattern;
if(!wsServiceDescriptor.implementedByEjbComponent()) {
urlPattern = wsServiceDescriptor.getEndpointAddressUri();
logger.log(Level.FINE, MessagesMessages.WSTCP_1114_APP_SERV_REG_GET_ENDP_URL_PATTERN_NON_EJB(urlPattern));
} else {
final String[] path = wsServiceDescriptor.getEndpointAddressUri().split("/");
if (path.length < 3) {
return "";
}
urlPattern = "/" + path[2];
logger.log(Level.FINE, MessagesMessages.WSTCP_1115_APP_SERV_REG_GET_ENDP_URL_PATTERN_EJB(urlPattern));
}
return urlPattern;
|
public static com.sun.xml.ws.transport.tcp.server.glassfish.AppServWSRegistry | getInstance()
return instance;
|
private boolean | isTCPEnabled(com.sun.enterprise.deployment.WebServiceEndpoint webServiceDesc)
return true;
|
private void | populateEndpoints(com.sun.enterprise.webservice.monitoring.WebServiceEngine engine)Populate currently registered WS Endpoints and register them
final Iterator<Endpoint> endpoints = engine.getEndpoints();
while(endpoints.hasNext()) {
registerEndpoint(endpoints.next());
}
|
protected void | registerEndpoint(com.sun.enterprise.webservice.monitoring.Endpoint endpoint)Register new WS Endpoint
final WebServiceEndpoint wsServiceDescriptor = endpoint.getDescriptor();
if(wsServiceDescriptor != null && isTCPEnabled(wsServiceDescriptor)) {
final String contextRoot = getEndpointContextRoot(wsServiceDescriptor);
final String urlPattern = getEndpointUrlPattern(wsServiceDescriptor);
// ContextRoot could be represented as leading slash or without (GF API changes from time to time)
// So we use slashed version for registries
final String slashedContextRoot = ensureSlash(contextRoot);
final String slashedUrlPattern = ensureSlash(urlPattern);
final String path = slashedContextRoot + slashedUrlPattern;
if (logger.isLoggable(Level.FINE)) {
logger.log(Level.FINE, MessagesMessages.WSTCP_1110_APP_SERV_REG_REGISTER_ENDPOINT(
wsServiceDescriptor.getServiceName(), path, wsServiceDescriptor.implementedByEjbComponent()));
}
final WSEndpointDescriptor descriptor = new WSEndpointDescriptor(wsServiceDescriptor,
contextRoot,
urlPattern,
endpoint.getEndpointSelector());
addToRegistry(slashedContextRoot, slashedUrlPattern, descriptor);
}
|
private WSEndpointDescriptor | removeFromRegistry(java.lang.String wsServiceName, java.lang.String endpointName)
final Map<String, WSEndpointDescriptor> endpointMap = registry.get(wsServiceName);
if (endpointMap != null) {
return endpointMap.remove(endpointName);
}
return null;
|