FileDocCategorySizeDatePackage
J2EEApplicationMdl.javaAPI DocGlassfish v2 API5271Fri May 04 22:24:16 BST 2007com.sun.enterprise.management.model

J2EEApplicationMdl

public class J2EEApplicationMdl extends J2EEDeployedObjectMdl

Fields Summary
private static String
MANAGED_OBJECT_TYPE
private String
appName
private boolean
hasWebServices
private String[]
endpointAddresses
Constructors Summary
public J2EEApplicationMdl(com.sun.enterprise.management.util.J2EEModuleCallBack module, com.sun.enterprise.deployment.Application app)

    
         
	super(module);
        
        appName = module.getParentName();
	if (app==null) {
	    return;
	}
	Set webServices = app.getWebServiceDescriptors();
	if (webServices.size()>0) {
	    hasWebServices = true;
	    Vector endpointList = new Vector();
	    for (Iterator itr = webServices.iterator();itr.hasNext();) {
		WebService webService = (WebService) itr.next();
		for (Iterator endpoints = webService.getWebServicesDescriptor().getEndpoints().iterator();
			endpoints.hasNext();) {
		    WebServiceEndpoint wse = (WebServiceEndpoint) endpoints.next();
		    endpointList.add(wse.getEndpointAddressUri());
		}
	    }
	    endpointAddresses = new String[endpointList.size()];
	    endpointList.copyInto(endpointAddresses);
	}	    
    
Methods Summary
public java.lang.String[]getendpointAddresses()

return
array of endpoint addresses defined for this application

	return endpointAddresses;
    
public booleangethasWebServices()

return
true if this application implements any webservice endpoint

	return hasWebServices;
    
public java.lang.Stringgetj2eeType()
The type of the J2EEManagedObject as specified by JSR77. The class that implements a specific type must override this method and return the appropriate type string.

        return MANAGED_OBJECT_TYPE;
    
public java.lang.String[]getmodules()


        Set appMods = findNames("j2eeType=EJBModule,J2EEServer=" + getJ2EEServer()+",J2EEApplication="+this.appName);
        appMods.addAll(findNames("j2eeType=WebModule,J2EEServer=" + getJ2EEServer()+",J2EEApplication="+this.appName));
        appMods.addAll(findNames("j2eeType=ResourceAdapterModule,J2EEServer=" + getJ2EEServer()+",J2EEApplication="+this.appName));
        appMods.addAll(findNames("j2eeType=AppClientModule,J2EEServer=" + getJ2EEServer()+",J2EEApplication="+this.appName));

        Iterator it = appMods.iterator();
        String [] mods = new String[appMods.size()];
        int i =0;
        while(it.hasNext()) {
            mods[i++] = ((ObjectName)it.next()).toString();
        }
        return mods;