Package org.teiid.rhq.plugin.objects

Examples of org.teiid.rhq.plugin.objects.SessionMetadata


  public <T> void getSessionCollectionValue(MetaValue pValue,Collection<SessionMetadata> list) throws Exception {
    MetaType metaType = pValue.getMetaType();
    if (metaType.isCollection()) {
      for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
        if (value.getMetaType().isComposite()) {
          SessionMetadata session = unwrapSessionMetaValue(value);
          list.add(session);
        } else {
          throw new IllegalStateException(pValue
              + " is not a Composite type"); //$NON-NLS-1$
        }
View Full Code Here


    MetaType metaType = pValue.getMetaType();
    if (metaType.isCollection()) {
      for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
        if (value.getMetaType().isComposite()) {
          if (ProfileServiceUtil.stringValue(((CompositeValueSupport)value).get("VDBName")).equals(vdbName)) { //$NON-NLS-1$
            SessionMetadata session = unwrapSessionMetaValue(value);
            list.add(session);
          }
        } else {
          throw new IllegalStateException(pValue+ " is not a Composite type"); //$NON-NLS-1$
        }
View Full Code Here

      return null;

    if (metaValue instanceof CompositeValue) {
      CompositeValueSupport compositeValue = (CompositeValueSupport) metaValue;
     
      SessionMetadata session = new SessionMetadata();
      session.setApplicationName((String) ProfileServiceUtil.stringValue(compositeValue.get(APPLICATION_NAME)));
      session.setCreatedTime((Long) ProfileServiceUtil.longValue(compositeValue.get(CREATED_TIME)));
      session.setClientHostName((String) ProfileServiceUtil.stringValue(compositeValue.get(CLIENT_HOST_NAME)));
      session.setIPAddress((String) ProfileServiceUtil.stringValue(compositeValue.get(IP_ADDRESS)));
      session.setLastPingTime((Long) ProfileServiceUtil.longValue(compositeValue.get(LAST_PING_TIME)));
      session.setSessionId((String) ProfileServiceUtil.stringValue(compositeValue.get(SESSION_ID)));
      session.setUserName((String) ProfileServiceUtil.stringValue(compositeValue.get(USER_NAME)));
      session.setVDBName((String) ProfileServiceUtil.stringValue(compositeValue.get(VDB_NAME)));
      session.setVDBVersion((Integer) ProfileServiceUtil.integerValue(compositeValue.get(VDB_VERSION)));
      session.setSecurityDomain((String) ProfileServiceUtil.stringValue(compositeValue.get(SECURITY_DOMAIN)));
      return session;
    }
    throw new IllegalStateException("Unable to unwrap session " + metaValue); //$NON-NLS-1$
  }
View Full Code Here

TOP

Related Classes of org.teiid.rhq.plugin.objects.SessionMetadata

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.