Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorustieber2011-05-19 05:46:50 +0000
committerustieber2011-05-19 05:46:50 +0000
commitbfa8aa67ac64f9da4f138ebe8ce23e81d957368c (patch)
tree7f050557fde87f4cf9c638b49194f9dd5e47a698 /target_explorer
parent3614a45e01c9a3fd5a819cd398c9919bb87fa899 (diff)
downloadorg.eclipse.tcf-bfa8aa67ac64f9da4f138ebe8ce23e81d957368c.tar.gz
org.eclipse.tcf-bfa8aa67ac64f9da4f138ebe8ce23e81d957368c.tar.xz
org.eclipse.tcf-bfa8aa67ac64f9da4f138ebe8ce23e81d957368c.zip
Target Explorer: Allow clients to choose to create transient peers (non visible to locator)
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java
index 7faf3cc0b..24736ce70 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.tcf.core/src/org/eclipse/tm/te/tcf/core/internal/ChannelManager.java
@@ -3,7 +3,7 @@
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Uwe Stieber (Wind River) - initial API and implementation
*******************************************************************************/
@@ -13,6 +13,7 @@ import java.util.Map;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.tm.tcf.core.AbstractPeer;
+import org.eclipse.tm.tcf.core.TransientPeer;
import org.eclipse.tm.tcf.protocol.IChannel;
import org.eclipse.tm.tcf.protocol.IPeer;
import org.eclipse.tm.tcf.protocol.Protocol;
@@ -137,11 +138,14 @@ public final class ChannelManager extends PlatformObject implements IChannelMana
String peerId = peerAttributes.get(IPeer.ATTR_ID);
assert peerId != null;
+ // Check if we shall open the peer transient
+ boolean isTransient = peerAttributes.containsKey("transient") ? Boolean.parseBoolean(peerAttributes.remove("transient")) : false; //$NON-NLS-1$ //$NON-NLS-2$
+
// Look the peer via the Locator Service.
IPeer peer = Protocol.getLocator().getPeers().get(peerId);
// If not peer could be found, create a new one
if (peer == null) {
- peer = new AbstractPeer(peerAttributes);
+ peer = isTransient ? new TransientPeer(peerAttributes) : new AbstractPeer(peerAttributes);
}
// Return the peer instance

Back to the top