Examples of CompositeType


Examples of fr.imag.adele.apam.CompositeType


  @Override
  public synchronized void setInitialConfig(URL modelLocation) throws IOException {
   
    CompositeType compositeType = CompositeTypeImpl.getRootCompositeType();
    Model model = Model.loadRootModel(this,m_context,modelLocation);
    obrManagers.put(compositeType, new OBRManager(this, compositeType, model));
  }
View Full Code Here

Examples of fr.imag.adele.apam.CompositeType

  @Override
  public Set<String> getCompositeRepositories(String compositeName) {
    Set<String> result = new HashSet<String>();
   
    CompositeType context = !compositeName.equals("root") ?
        apam.getCompositeType(compositeName) :
        CompositeTypeImpl.getRootCompositeType();
       
    if (context == null)
      return result;
View Full Code Here

Examples of fr.imag.adele.apam.CompositeType

    }

    /*
     * refresh the specified manager
     */
    CompositeType context = !compositeName.equals("root") ?
                    apam.getCompositeType(compositeName) :
                    CompositeTypeImpl.getRootCompositeType();
                   
    if (context == null)
      return false;
View Full Code Here

Examples of fr.imag.adele.apam.CompositeType

   */
  public static void updateComponent(Implementation component) {
    try {

      // return the composite type that physically deployed the bundle
      CompositeType compoTypeFrom = component.getFirstDeployed();

      logger.info("Updating implementation " + component.getName() + " in composite " + compoTypeFrom);

      for (DeploymentManager manager : ApamManagers.getDeploymentManagers()) {

View Full Code Here

Examples of fr.imag.adele.apam.CompositeType

  public CompositeType createCompositeType(String inCompoType, String name, String specification, String mainComponent, Set<ManagerModel> models, Map<String, String> attributes) {

    /*
     * Verify if it already exists
     */
    CompositeType compositeType = getCompositeType(name);
    if (compositeType != null) {
      logger.error("Error creating composite type: already exists " + name);
      return compositeType;
    }

View Full Code Here

Examples of javax.management.openmbean.CompositeType

                                     ObjectName objectName,
                                     ObjectAttributeInfo attrInfo,
                                     String[] dataTypes,
                                     List attributesList){

        CompositeType type = getCompositeType(connection, objectName, attrInfo);
        for(Iterator it=type.keySet().iterator(); it.hasNext(); ){
            String itemName = (String)it.next();
            OpenType itemType = type.getType(itemName);
            Class itemTypeClass = getClass(itemType.getClassName(),
                        this.getClass().getClassLoader());
            for(int j=0; j<dataTypes.length; j++){

                Class dataType = getClass(dataTypes[j],
                        this.getClass().getClassLoader());
                if(dataType.isAssignableFrom(itemTypeClass)){
                    attributesList.add(
                            new ObjectAttributeInfo(
                                    attrInfo.getName() + COMPOSITE_ATTR_SEPARATOR + itemName,
                                    type.getDescription(itemName),
                                    itemType.getClassName(), false, true, false));
                }
            }
        }
    }
View Full Code Here

Examples of javax.management.openmbean.CompositeType

            itemName = attribute.substring(index + 1);
            attribute = attribute.substring(0, index);
            for(int i=0; i<objAttributes.length; i++){
                if(objAttributes[i].getName().equals(attribute)){
                    // it is a CompositeData type
                    CompositeType type = getCompositeType(connection,
                            objectName, objAttributes[i]);
                    return type.getType(itemName).getClassName();
                }
            }
        }
        throw new ServiceException(ErrorCodes.INVALID_MBEAN_ATTRIBUTE,
                attribute, objectName);
View Full Code Here

Examples of javax.management.openmbean.CompositeType

    private CompositeType createCompositeType()
        throws Exception {
       
        String[] itemDescriptions = itemNames;
       
        CompositeType compositeType = new CompositeType(
                CompositeType.class.getName(), compTypeDesc,
                itemNames,
                itemDescriptions,
                itemTypes);
       
View Full Code Here

Examples of javax.management.openmbean.CompositeType

      String[] keys = properties.keySet().toArray(new String[0]);
      OpenType[] itemTypes = new OpenType[keys.length];
      for (int i = 0; i < itemTypes.length; i++) {
        itemTypes[i] = SimpleType.STRING;
      }
      CompositeType propsType;
      propsType = new CompositeType("Properties type", "properties", keys, keys, itemTypes);
      CompositeDataSupport propsData = new CompositeDataSupport(propsType, properties);
      return propsData;
    } catch (OpenDataException e) {
      throw new AssertException("problem with jmx data generation", e);
    }
View Full Code Here

Examples of javax.management.openmbean.CompositeType

        return this.bundleService.selectBundles(ids, false);
    }

    public TabularData getBundles() throws MBeanException {
        try {
            CompositeType bundleType = new CompositeType("Bundle", "OSGi Bundle",
                    new String[]{"ID", "Name", "Version", "Start Level", "State"},
                    new String[]{"ID of the Bundle", "Name of the Bundle", "Version of the Bundle", "Start Level of the Bundle", "Current State of the Bundle"},
                    new OpenType[]{SimpleType.LONG, SimpleType.STRING, SimpleType.STRING, SimpleType.INTEGER, SimpleType.STRING});
            TabularType tableType = new TabularType("BundlesMBeanImpl", "Tables of all BundlesMBeanImpl", bundleType, new String[]{"ID"});
            TabularData table = new TabularDataSupport(tableType);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.