FileDocCategorySizeDatePackage
EndpointRegistration.javaAPI DocGlassfish v2 API7870Fri May 04 22:24:42 BST 2007com.sun.enterprise.admin.wsmgmt.lifecycle

EndpointRegistration

public class EndpointRegistration extends Object
Manages filters for each web service end point, according to their configuration and registers/unregisters the required dotted names.
author
Satish Viswanatham
since
J2SE 5.0

Fields Summary
private static com.sun.enterprise.admin.monitor.registry.MonitoringRegistry
registry
private String
ctxRoot
String
name
String
moduleName
boolean
isStandAlone
String
vs
String
j2eeAppName
boolean
isEjbModule
String
endpoint
Constructors Summary
public EndpointRegistration(String n, String modName, String cRoot, boolean isSA, String v, String appName, boolean isEjb)
Contructor

param
name Name of the web service endpoint
param
moduleName Name of the module (bundleName)
param
boolean Indicates if this module is standalone or not
param
vs Name of the virtual server
param
j2eeAppName Name of the J2EE application
param
isEjbModule true, if the module of ejb type


        name = n;
        moduleName = modName;
        this.ctxRoot = cRoot;
        if ((ctxRoot != null) && (ctxRoot.length() > 0) &&
            (ctxRoot.charAt(0) != '/")) {
            ctxRoot = "/" + ctxRoot;
        }
        if ("".equals(ctxRoot)) {
            ctxRoot = "/";
        }
        isStandAlone = isSA;
        vs = v;
        j2eeAppName = appName;
        isEjbModule = isEjb;
        endpoint =
        WebServiceMgrBackEnd.getManager().getFullyQualifiedName( j2eeAppName,
            moduleName, name);

     
Methods Summary
public voiddisableLOW()


            FilterRegistry.getInstance().unregisterFilterByName(
            Filter.PRE_PROCESS_REQUEST, endpoint,
            Constants.AGGREGATE_STATS_FILTER );
            FilterRegistry.getInstance().unregisterFilterByName(
            Filter.POST_PROCESS_RESPONSE, endpoint,
            Constants.AGGREGATE_STATS_FILTER );
            if ( isEjbModule ) {
               registry.unregisterWSAggregateStatsForEjb( 
                    name, moduleName, j2eeAppName);
            } else {
                registry.unregisterWSAggregateStatsForWeb( 
                    name, moduleName, ctxRoot, j2eeAppName, vs);
            }
            StatsProviderManager.getInstance().unregisterEndpointStatsProvider(
                endpoint);
    
public voidenableLOW()
This method is used during initialization to install Filters required for Monitoring. This method is also called during Monitoring level change event and during deploy/un-deploy

throws

    
            // check for re-deploy case 
            WebServiceEndpointStatsProvider prev =
            StatsProviderManager.getInstance().getEndpointStatsProvider(endpoint);

            if ( prev != null) {
                return;
            }

            Filter f = new AggregateStatsFilter();
            FilterRegistry.getInstance().registerFilter(
                Filter.PRE_PROCESS_REQUEST, endpoint, f);
            FilterRegistry.getInstance().registerFilter(
                Filter.POST_PROCESS_RESPONSE, endpoint, f);

            // register corresponding stats provider
            WebServiceEndpointStatsProvider prov = new
            WebServiceEndpointStatsProviderImpl();

            StatsProviderManager.getInstance().
                registerEndpointStatsProvider(endpoint, prov);

            MonitoringLevelListener listener = new
            WSMonitoringLevelListener(name, moduleName, ctxRoot, isStandAlone,
                vs, j2eeAppName, isEjbModule);
            Stats stats = new WebServiceEndpointStatsImpl(prov);

            String appName = null;
            if ( isStandAlone == true) {
                appName = null;
            } else {
                appName = j2eeAppName;
            }

            if ( isEjbModule ) {
                registry.registerWSAggregateStatsForEjb(stats, 
                    name, moduleName, appName, listener);
            } else {
                registry.registerWSAggregateStatsForWeb(stats, 
                    name, moduleName, ctxRoot, appName, vs, listener);
            }