fut.addResultListener(new SwingResultListener<IComponentManagementService>(new IResultListener<IComponentManagementService>() .addResultListener(new SwingResultListener<IExternalAccess>(new IResultListener<IExternalAccess>() .addResultListener(new SwingResultListener<IProgressService>(new IResultListener<IProgressService>() .addResultListener(new SwingResultListener<Integer>(new IResultListener<Integer>()
public void run() { customCommandAvailable(command); } });
public void run() { customExceptionOccurred(exception); } });
public void run() { customResultAvailable(result); } });
/** * Called when an exception occurred. * @param exception The exception. */ public void exceptionOccurredIfUndone(Exception exception) { undone = true; exceptionOccurred(exception); }
/** * Called when the result is available. * @param result The result. */ final public void resultAvailable(final E result) { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customResultAvailable(result); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { customResultAvailable(result); } }); } }
public void resultAvailable(IResourceIdentifier rid) .addResultListener(new SwingResultListener<String>(new IResultListener<String>() .addResultListener(new SwingResultListener<byte[]>(new IResultListener<byte[]>()
/** * Called when an exception occurred. * @param exception The exception. */ final public void exceptionOccurred(final Exception exception) { // exception.printStackTrace(); // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customExceptionOccurred(exception); } else { // Thread.dumpStack(); SwingUtilities.invokeLater(new Runnable() { public void run() { customExceptionOccurred(exception); } }); } }
/** * Called when a command is available. */ final public void commandAvailable(final Object command) { // Hack!!! When triggered from shutdown hook, swing might be terminated // and invokeLater has no effect (grrr). if(!SReflect.HAS_GUI || SwingUtilities.isEventDispatchThread())// || Starter.isShutdown()) // if(SwingUtilities.isEventDispatchThread()) { customCommandAvailable(command); } else { // Thread.dumpStack(); SwingUtilities.invokeLater(new Runnable() { public void run() { customCommandAvailable(command); } }); } }
public void resultAvailable(IComponentIdentifier root) .addResultListener(new SwingResultListener<IExternalAccess>(new IResultListener<IExternalAccess>() .addResultListener(new SwingResultListener<IExternalAccess>(new IResultListener<IExternalAccess>() ea.getNFPropertyNames().addResultListener(new SwingResultListener<String[]>(new IResultListener<String[]>() .addResultListener(new SwingResultListener<Object[]>(new IResultListener<Object[]>() ret.addResultListener(new SwingResultListener<List<ITreeNode>>(new IResultListener<List<ITreeNode>>()
public void actionPerformed(ActionEvent e) secser.getVirtuals().addResultListener(new SwingResultListener<Map<String,Set<String>>>(new IResultListener<Map<String,Set<String>>>() secser.addVirtual(v, p).addResultListener(new SwingResultListener<Void>(new IResultListener<Void>()
public void resultAvailable(final IService ser) .addResultListener(new SwingResultListener<Map<String,INFPropertyMetaInfo>>(new IResultListener<Map<String,INFPropertyMetaInfo>>() .addResultListener(new SwingResultListener<Map<MethodInfo,Map<String,INFPropertyMetaInfo>>>(new IResultListener<Map<MethodInfo,Map<String,INFPropertyMetaInfo>>>()
final Settings sets = agent.getSettings(); IFuture<IClockService> fut = ia.getComponentFeature(IRequiredServicesFeature.class).getRequiredService("clockservice"); fut.addResultListener(new SwingResultListener<IClockService>(new IResultListener<IClockService>()
public void actionPerformed(ActionEvent e) { final String item = tfitem.getText(); ls.claimItem(item).addResultListener(new SwingResultListener<Boolean>(new IResultListener<Boolean>() { public void resultAvailable(Boolean result) { if(result.booleanValue()) { taclaimed.append(item+"\n"); } if(tfitem.getText().equals(item)) { tfitem.setText("Did not get item: "+item); buclaim.setEnabled(false); } } public void exceptionOccurred(Exception exception) { tfitem.setText(""); buclaim.setEnabled(false); } })); } });
public void run() { secservice.getKeystoreDetails().addResultListener(new SwingResultListener<Map<String, KeyStoreEntry>>(new IResultListener<Map<String,KeyStoreEntry>>() { public void resultAvailable(Map<String, KeyStoreEntry> infos) { kttm.removeAll(); for(Iterator<String> it = infos.keySet().iterator(); it.hasNext(); ) { KeyStoreEntry kse = infos.get(it.next()); kttm.addObject(kse.getAlias(), kse); } } public void exceptionOccurred(Exception exception) { jcc.setStatusText("Exception during refresh: "+exception.getMessage()); } })); } };
getServiceAccess().addResultListener(new SwingResultListener<IExternalAccess>(new IResultListener<IExternalAccess>() .addResultListener(new SwingResultListener<FileData>(new IResultListener<FileData>()
getServiceAccess().addResultListener(new SwingResultListener<IExternalAccess>(new IResultListener<IExternalAccess>() .addResultListener(new SwingResultListener<FileData>(new IResultListener<FileData>()
public void run() { secservice.getKeystoreDetails().addResultListener(new SwingResultListener<Map<String, KeyStoreEntry>>(new IResultListener<Map<String,KeyStoreEntry>>() { public void resultAvailable(Map<String, KeyStoreEntry> infos) { kttm.removeAll(); for(Iterator<String> it = infos.keySet().iterator(); it.hasNext(); ) { KeyStoreEntry kse = infos.get(it.next()); kttm.addObject(kse.getAlias(), kse); } } public void exceptionOccurred(Exception exception) { jcc.setStatusText("Exception during refresh: "+exception.getMessage()); } })); } };
public void customIntermediateResultAvailable(final IAppProviderService ser) { cnt++; ser.getAppMetaInfo().addResultListener(new SwingResultListener<AppMetaInfo>(new IResultListener<AppMetaInfo>() { public void resultAvailable(AppMetaInfo ami) { // System.out.println("found: "+ami); if(!apps.containsKey(ser)) { // todo: save according to id apps.put(ser, ami); refreshAppTable(); } if(--cnt==0 && fin) ret.setResult(null); } public void exceptionOccurred(Exception exception) { if(--cnt==0 && fin) ret.setResult(null); } })); }
public void customIntermediateResultAvailable(final IAppProviderService ser) { cnt++; ser.getAppMetaInfo().addResultListener(new SwingResultListener<AppMetaInfo>(new IResultListener<AppMetaInfo>() { public void resultAvailable(AppMetaInfo ami) { // System.out.println("found: "+ami); if(!apps.containsKey(ser)) { // todo: save according to id apps.put(ser, ami); refreshAppTable(); } if(--cnt==0 && fin) ret.setResult(null); } public void exceptionOccurred(Exception exception) { if(--cnt==0 && fin) ret.setResult(null); } })); }