Search in sources :

Example 16 with Manager

use of si.ijs.maci.Manager in project ACS by ACS-Community.

the class TreeMouseListener method getLogConfFromService.

private LoggingConfigurableOperations getLogConfFromService(final String serviceName) throws Exception {
    System.out.println("Getting LoggingConfigurable out of Manager for service " + serviceName);
    // Manager
    final Manager mgr = model.getManagerRef();
    if (mgr == null) {
        throw new Exception("Invalid manager reference");
    }
    SwingWorker<LoggingConfigurableOperations, Void> worker = new SwingWorker<LoggingConfigurableOperations, Void>() {

        protected LoggingConfigurableOperations doInBackground() throws Exception {
            LoggingConfigurableOperations logConf;
            try {
                logConf = LoggingConfigurableHelper.narrow(mgr.get_service(model.getAdminClient().getHandle(), serviceName, false));
            } catch (Throwable t) {
                throw new Exception("Error getting the LoggingConfigurable out of Manager for service " + serviceName + " :\n" + t.getMessage(), t);
            }
            return logConf;
        }
    };
    worker.execute();
    return worker.get();
}
Also used : LoggingConfigurableOperations(alma.Logging.LoggingConfigurableOperations) SwingWorker(javax.swing.SwingWorker) Manager(si.ijs.maci.Manager) LogPaneNotFoundException(alma.acs.gui.loglevel.LogPaneNotFoundException)

Example 17 with Manager

use of si.ijs.maci.Manager in project ACS by ACS-Community.

the class TreeMouseListener method getLogConfFromManager.

/**
	 * Get the LoggingConfigurable out of the manager
	 * 
	 * @return The LoggingConfigurable for the manager
	 */
private LoggingConfigurableOperations getLogConfFromManager() throws Exception {
    System.out.println("Getting LoggingConfigurable out of Manager");
    // Manager
    Manager mgr = model.getManagerRef();
    if (mgr == null) {
        throw new Exception("Invalid manager reference");
    }
    SwingWorker<LoggingConfigurableOperations, Void> worker = new SwingWorker<LoggingConfigurableOperations, Void>() {

        protected LoggingConfigurableOperations doInBackground() throws Exception {
            LoggingConfigurableOperations logConf;
            try {
                logConf = LoggingConfigurableHelper.narrow(model.getManagerRef());
            } catch (Throwable t) {
                throw new Exception("Error getting the LoggingConfigurable out of Manager:\n" + t.getMessage(), t);
            }
            return logConf;
        }
    };
    worker.execute();
    return worker.get();
}
Also used : LoggingConfigurableOperations(alma.Logging.LoggingConfigurableOperations) SwingWorker(javax.swing.SwingWorker) Manager(si.ijs.maci.Manager) LogPaneNotFoundException(alma.acs.gui.loglevel.LogPaneNotFoundException)

Aggregations

Manager (si.ijs.maci.Manager)17 POAManager (org.omg.PortableServer.POAManager)11 ClientInfo (si.ijs.maci.ClientInfo)6 ComponentInfo (si.ijs.maci.ComponentInfo)3 ContainerInfo (si.ijs.maci.ContainerInfo)3 CBDescIn (alma.ACS.CBDescIn)2 CompletionHolder (alma.ACSErr.CompletionHolder)2 LoggingConfigurableOperations (alma.Logging.LoggingConfigurableOperations)2 LogPaneNotFoundException (alma.acs.gui.loglevel.LogPaneNotFoundException)2 SwingWorker (javax.swing.SwingWorker)2 ORB (org.omg.CORBA.ORB)2 Monitor (alma.ACS.Monitor)1 MonitorstringSeq (alma.ACS.MonitorstringSeq)1 ROstring (alma.ACS.ROstring)1 ROstringSeq (alma.ACS.ROstringSeq)1 ClientLogManager (alma.acs.logging.ClientLogManager)1 AcsORBProfilerImplBase (alma.acs.profiling.orb.AcsORBProfilerImplBase)1 InvalidComponentSpecEx (alma.maciErrType.InvalidComponentSpecEx)1 NoDefaultComponentEx (alma.maciErrType.NoDefaultComponentEx)1 NoPermissionEx (alma.maciErrType.NoPermissionEx)1