Methods Summary |
---|
public com.sun.enterprise.deployment.annotation.AnnotatedElementHandler | createContextForWeb()This method create a context for web component(s) by using
descriptor(s) associated to given webComponet impl class.
Return null if corresponding descriptor is not found.
AnnotatedElement anTypeElement =
this.getProcessingContext().getProcessor(
).getLastAnnotatedElement(ElementType.TYPE);
WebComponentDescriptor[] webComps = null;
if (anTypeElement != null) {
String implClassName = ((Class)anTypeElement).getName();
webComps = getDescriptor().getWebComponentByImplName(implClassName);
}
AnnotatedElementHandler aeHandler = null;
if (webComps != null && webComps.length > 1) {
aeHandler = new WebComponentsContext(webComps);
} else if (webComps != null && webComps.length == 1) {
aeHandler = new WebComponentContext(webComps[0]);
}
if (aeHandler != null) {
// push a WebComponent(s)Context to stack
this.getProcessingContext().pushHandler(aeHandler);
}
return aeHandler;
|
public com.sun.enterprise.deployment.WebBundleDescriptor | getDescriptor()
return (WebBundleDescriptor)descriptor;
|
public com.sun.enterprise.deployment.types.HandlerChainContainer[] | getHandlerChainContainers(boolean serviceSideHandlerChain, java.lang.Class declaringClass)
if(serviceSideHandlerChain) {
List<WebServiceEndpoint> result = new ArrayList<WebServiceEndpoint>();
for (WebServiceEndpoint endpoint : getDescriptor().getWebServices().getEndpoints()) {
if (endpoint.getWebComponentImpl().getWebComponentImplementation().equals(declaringClass.getName())) {
result.add(endpoint);
}
}
return(result.toArray(new HandlerChainContainer[0]));
} else {
List<ServiceReferenceDescriptor> result = new ArrayList<ServiceReferenceDescriptor>();
result.addAll(getDescriptor().getServiceReferenceDescriptors());
return(result.toArray(new HandlerChainContainer[0]));
}
|