public void resultAvailable(IComponentIdentifier result) { if(result!=null) { addCMSListener(result); } else { // state = STATE_UNCONNECTED; getModel().fireNodeChanged(ProxyComponentTreeNode.this); } }
/** * Get the cid. * @return the cid. */ public IComponentIdentifier getComponentIdentifier() { if(cid==null) getRemoteComponentIdentifier(); return cid; }
getRemoteComponentIdentifier().addResultListener(new SwingResultListener<IComponentIdentifier>(new IResultListener<IComponentIdentifier>() getConnectionState().addResultListener(new DefaultResultListener<IProxyAgentService.State>()
searchChildren(cms, result).addResultListener(new IResultListener<List<ITreeNode>>() getModel().fireNodeChanged(ProxyComponentTreeNode.this);
&& ((ProxyComponentTreeNode)nodes[i]).getComponentIdentifier()!=null;
public void exceptionOccurred(Exception exception) { // System.out.println("ex: "+exception); // state = exception instanceof SecurityException? STATE_LOCKED : STATE_UNCONNECTED; getModel().fireNodeChanged(ProxyComponentTreeNode.this); } }));
for(int i=0; allproxy && i<nodes.length; i++) allproxy = nodes[i] instanceof ProxyComponentTreeNode && ((ProxyComponentTreeNode)nodes[i]).isConnected();
/** * Create a new component node. */ public ISwingTreeNode createComponentNode(final IComponentDescription desc) { ISwingTreeNode node = getModel().getNode(desc.getName()); if(node==null) { boolean proxy = "jadex.platform.service.remote.Proxy".equals(desc.getModelName()) // Only create proxy nodes for local proxy components to avoid infinite nesting. && ((IActiveComponentTreeNode)getModel().getRoot()).getComponentIdentifier().getName().equals(desc.getName().getPlatformName()); if(proxy) { node = new ProxyComponentTreeNode(ComponentTreeNode.this, getModel(), getTree(), desc, cms, iconcache, access); } else { node = new ComponentTreeNode(ComponentTreeNode.this, getModel(), getTree(), desc, cms, iconcache, access); } } return node; }
getConnectionState().addResultListener(new DefaultResultListener<IProxyAgentService.State>() getRemoteComponentIdentifier().addResultListener(new SwingResultListener<IComponentIdentifier>(new IResultListener<IComponentIdentifier>()
public void actionPerformed(ActionEvent e) { for(int i=0; i<nodes.length; i++) { final IComponentIdentifier cid = ((ProxyComponentTreeNode)nodes[i]).getComponentIdentifier(); SServiceProvider.getService(jcc.getPlatformAccess().getServiceProvider(), IComponentManagementService.class, RequiredServiceInfo.SCOPE_PLATFORM) .addResultListener(new SwingDefaultResultListener<IComponentManagementService>(panel) { public void customResultAvailable(IComponentManagementService cms) { cms.getExternalAccess(cid) .addResultListener(new SwingDefaultResultListener<IExternalAccess>(panel) { public void customResultAvailable(IExternalAccess ea) { jcc.showPlatform(ea); } }); } }); } } }
public void exceptionOccurred(Exception exception) { // System.out.println("ex: "+exception); // state = exception instanceof SecurityException? STATE_LOCKED : STATE_UNCONNECTED; List<ITreeNode> list = Collections.emptyList(); setChildren(list); getModel().fireNodeChanged(ProxyComponentTreeNode.this); // exception.printStackTrace(); } }));
final IComponentIdentifier cid = pctn.getComponentIdentifier(); if(cid!=null)
sel.getRemoteComponentIdentifier().addResultListener(new SwingDefaultResultListener(ComponentTreePanel.this)