Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java
new file mode 100644
index 000000000..b7d7aca1f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IChannelManager.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.core.interfaces;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IPeer;
+
+/**
+ * TCF channel manager public API declaration.
+ */
+public interface IChannelManager extends IAdaptable {
+
+ /**
+ * Client call back interface for openChannel(...).
+ */
+ interface DoneOpenChannel {
+ /**
+ * Called when the channel fully opened or failed to open.
+ *
+ * @param error The error description if operation failed, <code>null</code> if succeeded.
+ * @param channel The channel object or <code>null</code>.
+ */
+ void doneOpenChannel(Throwable error, IChannel channel);
+ }
+
+ /**
+ * Opens a new channel to communicate with the given peer.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param peer The peer. Must not be <code>null</code>.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ public void openChannel(IPeer peer, DoneOpenChannel done);
+
+ /**
+ * Opens a new channel to communicate with the peer described by the
+ * given peer attributes.
+ * <p>
+ * The method can be called from any thread context.
+ *
+ * @param peerAttributes The peer attributes. Must not be <code>null</code>.
+ * @param done The client callback. Must not be <code>null</code>.
+ */
+ public void openChannel(Map<String, String> peerAttributes, DoneOpenChannel done);
+}

Back to the top