Package javax.management.openmbean

Examples of javax.management.openmbean.CompositeDataSupport


        while (keys.hasMoreElements()) {
            String key = (String) keys.nextElement();
            Map<String, Object> values = new HashMap<String, Object>();
            values.put(KEY, key);
            values.put(VALUE, headers.get(key));
            dataSupport.put(new CompositeDataSupport(HEADER_TYPE, values));
        }
        return dataSupport;
    }
View Full Code Here


                Object value = serviceReference.getProperty(key);
                Map<String, Object> values = new HashMap<String, Object>();
                values.put(JmxConstants.KEY, key);
                values.put(JmxConstants.TYPE, Utils.getValueType(value));
                values.put(JmxConstants.VALUE, Utils.serializeToString(value));
                dataSupport.put(new CompositeDataSupport(JmxConstants.PROPERTY_TYPE, values));
            }
            return dataSupport;
        } catch (IllegalArgumentException e) {
            logVisitor.warning("getProperties error", e);
            throw e;
View Full Code Here

                    Map<String, Object> values = new HashMap<String, Object>();
                    values.put(BUNDLE_IDENTIFIER, serviceReference.getBundle().getBundleId());
                    values.put(IDENTIFIER, serviceReference.getProperty(Constants.SERVICE_ID));
                    values.put(OBJECT_CLASS, serviceReference.getProperty(Constants.OBJECTCLASS));
                    values.put(USING_BUNDLES, Utils.toLongArray(Utils.getIds(serviceReference.getUsingBundles())));
                    dataSupport.put(new CompositeDataSupport(SERVICE_TYPE, values));
                }
            }
            return dataSupport;
        } catch (Exception e) {
            logVisitor.warning("listServices error", e);
View Full Code Here

            values.put(OBJECT_CLASS, serviceReference.getProperty(Constants.OBJECTCLASS));
            values.put(BUNDLE_IDENTIFIER, serviceReference.getBundle().getBundleId());
            values.put(BUNDLE_LOCATION, serviceReference.getBundle().getLocation());
            values.put(BUNDLE_SYMBOLIC_NAME, serviceReference.getBundle().getSymbolicName());
            values.put(EVENT, event.getType());
            notification.setUserData(new CompositeDataSupport(ServiceStateMBean.SERVICE_EVENT_TYPE, values));

            nbs.sendNotification(notification);
        } catch (Exception e) {
            logVisitor.warning("Unable to send ServiceEvent notification", e);
        }
View Full Code Here

          attributeValue = Arrays.asList((String[]) attributeVal);
        } else {
          attributeValue = attributeVal;
        }
      } else {
        final CompositeDataSupport compositeAttributeValue =
            (CompositeDataSupport) context.getConnection().getAttribute(mbeanName, compositeAttribute);
        attributeValue = compositeAttributeValue.get(attribute);
      }
   
      // set query result as variable
      context.setVar(var, attributeValue);
     
View Full Code Here

            String initiator = (String) event.getProperty(MON_LISTENER_ID);
            initiator = initiator != null ? initiator : "";
            values.put(MonitorAdminMBean.EVENT_INITIATOR, initiator);
           
            notification.setUserData(new CompositeDataSupport(MonitorAdminMBean.EVENT_TYPE, values));

            nbs.sendNotification(notification);
        } catch (Exception e) {
            logVisitor.warning("Unable to send MonitorAdminEvent notification", e);
        }
View Full Code Here

            Map<String, Object> values = new HashMap<String, Object>();
            String name = authorization.getName();
            values.put(NAME, name);
            Role authRole = service.getRole(name);
            values.put(TYPE, authRole.getType());
            return new CompositeDataSupport(AUTORIZATION_TYPE, values);
        } catch (IllegalArgumentException e) {
            logVisitor.warning("getAuthorization error", e);
            throw e;
        } catch (Exception e) {
            logVisitor.warning("getAuthorization error", e);
View Full Code Here

            values.put(TYPE, group.getProperties());
            values.put(PROPERTIES, Utils.getProperties(group.getProperties()));
            values.put(CREDENTIALS, Utils.getProperties(group.getCredentials()));
            values.put(MEMBERS, getRoleNames(group.getMembers()));
            values.put(REQUIRED_MEMBERS, getRoleNames(group.getRequiredMembers()));
            return new CompositeDataSupport(GROUP_TYPE, values);
        } catch (IllegalArgumentException e) {
            logVisitor.warning("getGroup error", e);
            throw e;
        } catch (Exception e) {
            logVisitor.warning("getGroup error", e);
View Full Code Here

            if (role != null) {
                Map<String, Object> values = new HashMap<String, Object>();
                values.put(NAME, role.getName());
                values.put(TYPE, role.getProperties());
                values.put(PROPERTIES, Utils.getProperties(role.getProperties()));
                return new CompositeDataSupport(ROLE_TYPE, values);
            }
            return null;
        } catch (Exception e) {
            logVisitor.warning("getRole error", e);
            throw new IOException(e.getMessage());
View Full Code Here

            Map<String, Object> values = new HashMap<String, Object>();
            values.put(NAME, user.getName());
            values.put(TYPE, user.getProperties());
            values.put(PROPERTIES, Utils.getProperties(user.getProperties()));
            values.put(CREDENTIALS, Utils.getProperties(user.getCredentials()));
            return new CompositeDataSupport(USER_TYPE, values);
        } catch (IllegalArgumentException e) {
            logVisitor.warning("getUser error", e);
            throw e;
        } catch (Exception e) {
            logVisitor.warning("getUser error", e);
View Full Code Here

TOP

Related Classes of javax.management.openmbean.CompositeDataSupport

Copyright © 2018 www.massapicom. 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.