Package org.jboss.managed.api

Examples of org.jboss.managed.api.ManagedComponent


        }
    }

    private File getServerTempDirectory() {
        ManagementView managementView = getProfileServiceConnection().getManagementView();
        ManagedComponent serverConfigComponent = ManagedComponentUtils.getSingletonManagedComponent(managementView,
            new ComponentType("MCBean", "ServerConfig"));
        String serverTempDir = (String) ManagedComponentUtils.getSimplePropertyValue(serverConfigComponent,
            "serverTempDir");

        return new File(serverTempDir);
View Full Code Here


  }

  @Override
  public Translator getTranslator(String deployedName) throws AdminException {
    try {
      ManagedComponent mc = getView().getComponent(deployedName, TRANSLATOR_TYPE);
      if (mc != null) {
        return AdminObjectBuilder.buildAO(mc, TranslatorMetaData.class);
      }
      return null;
    } catch(Exception e) {
View Full Code Here

  }

 
  @Override
  public void deleteVDB(String vdbName, int vdbVersion) throws AdminException {
    ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
    if (mc != null) {
      ManagedUtil.removeArchive(getDeploymentManager(), mc.getDeployment().getName());
    }
  } 
View Full Code Here

    }
  } 
 
  @Override
  public VDB getVDB(String vdbName, int vdbVersion) throws AdminException{
    ManagedComponent mc = getVDBManagedComponent(vdbName, vdbVersion);
    if (mc != null) {
      return AdminObjectBuilder.buildAO(mc, VDBMetaData.class);
    }
    return null;
  }
View Full Code Here

   
  @Override
  public Collection<Session> getSessions() throws AdminException {
    try {
      Collection<Session> sessionList = new ArrayList<Session>();
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      MetaValue value = ManagedUtil.executeOperation(mc, "getActiveSessions");//$NON-NLS-1$
      MetaValue[] sessions = ((CollectionValueSupport)value).getElements();
      for (MetaValue mv:sessions) {
        sessionList.add((SessionMetadata)MetaValueFactory.getInstance().unwrap(mv, SessionMetadata.class));
      }
View Full Code Here

  }
 
  @Override
  public void terminateSession(String sessionId) throws AdminException {
    try {
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      ManagedUtil.executeOperation(mc, "terminateSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
    } catch (Exception e) {
      throw new AdminComponentException(e.getMessage(), e);
    }      
  } 
View Full Code Here

 
  @Override
    public Collection<Request> getRequests() throws AdminException {
    try {
      Collection<Request> requestList = new ArrayList<Request>();
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      MetaValue value = ManagedUtil.executeOperation(mc, "getRequests");//$NON-NLS-1$
      MetaValue[] requests = ((CollectionValueSupport)value).getElements();     
      for (MetaValue mv:requests) {
        requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
      }
View Full Code Here

   
  @Override
    public Collection<Request> getRequestsForSession(String sessionId) throws AdminException {
    try {
      Collection<Request> requestList = new ArrayList<Request>();
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      MetaValue value = ManagedUtil.executeOperation(mc, "getRequestsForSession", SimpleValueSupport.wrap(sessionId));//$NON-NLS-1$
      MetaValue[] requests = ((CollectionValueSupport)value).getElements();
      for (MetaValue mv:requests) {
        requestList.add((RequestMetadata)MetaValueFactory.getInstance().unwrap(mv, RequestMetadata.class));
      }
View Full Code Here

    }
 
  @Override
  public void cancelRequest(String sessionId, long executionId) throws AdminException{
    try {
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      ManagedUtil.executeOperation(mc, "cancelRequest", SimpleValueSupport.wrap(sessionId), SimpleValueSupport.wrap(executionId));//$NON-NLS-1$
    } catch (Exception e) {
      throw new AdminComponentException(e.getMessage(), e);
    }      
  }
View Full Code Here

 
  @Override
  public Collection<String> getCacheTypes() throws AdminException {
    try {
      Collection<String> requestList = new ArrayList<String>();
      ManagedComponent mc = getView().getComponent(DQPNAME, DQPTYPE)
      MetaValue value = ManagedUtil.executeOperation(mc, "getCacheTypes");//$NON-NLS-1$
      MetaValue[] requests = ((CollectionValueSupport)value).getElements();
      for (MetaValue mv:requests) {
        requestList.add(ManagedUtil.stringValue(mv));
      }
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.ManagedComponent

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.