Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-07-16 06:04:05 +0000
committerEike Stepper2009-07-16 06:04:05 +0000
commiteee80c7552084e837eb80982bdd25bef235b0229 (patch)
tree579ff2edcede2adefd61237296e9d1ff1d4ffbda
parentf6179c7d6969609bda4f741e8a48d595239b7657 (diff)
downloadcdo-eee80c7552084e837eb80982bdd25bef235b0229.tar.gz
cdo-eee80c7552084e837eb80982bdd25bef235b0229.tar.xz
cdo-eee80c7552084e837eb80982bdd25bef235b0229.zip
[260908] Provide basic collaboration capabilities for all sessions of a repository
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260908
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/remote/CDORemoteSessionManager.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/remote/CDORemoteSessionManager.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/remote/CDORemoteSessionManager.java
index b29d06671a..9bdf7b1c70 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/remote/CDORemoteSessionManager.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/session/remote/CDORemoteSessionManager.java
@@ -90,13 +90,24 @@ public interface CDORemoteSessionManager extends IContainer<CDORemoteSession>
public void setForceSubscription(boolean forceSubscription);
/**
+ * An {@link IEvent event} that is fired by a {@link #getSource() remote session manager} after the
+ * {@link CDORemoteSessionManager#isSubscribed() subscription mode} of the
+ * {@link CDORemoteSessionManager#getLocalSession() local session} changed.
+ *
* @author Eike Stepper
* @since 3.0
*/
public interface LocalSubscriptionChangedEvent extends IEvent
{
+ /**
+ * Returns the remote session manager that fired this event.
+ */
public CDORemoteSessionManager getSource();
+ /**
+ * Returns <code>true</code> if the {@link #getSource() remote session manager} was subscribed, <code>false</code>
+ * otherwise.
+ */
public boolean isSubscribed();
}
@@ -110,26 +121,49 @@ public interface CDORemoteSessionManager extends IContainer<CDORemoteSession>
{
}
+ /**
+ * Called if the {@link CDORemoteSessionManager#isSubscribed() subscription mode} of the local session changed.
+ */
protected void onLocalSubscription(boolean subscribed)
{
}
+ /**
+ * Called if the local session is {@link CDORemoteSessionManager#isSubscribed() subscribed} and a new remote session
+ * was opened to the same repository as the local session.
+ */
protected void onOpened(CDORemoteSession remoteSession)
{
}
+ /**
+ * Called if the local session is {@link CDORemoteSessionManager#isSubscribed() subscribed} and a remote session to
+ * the same repository as the local session was closed.
+ */
protected void onClosed(CDORemoteSession remoteSession)
{
}
+ /**
+ * Called if the local session is {@link CDORemoteSessionManager#isSubscribed() subscribed} and a remote session
+ * {@link CDORemoteSession#isSubscribed() subscribed} to the same repository as the local session.
+ */
protected void onSubscribed(CDORemoteSession remoteSession)
{
}
+ /**
+ * Called if the local session is {@link CDORemoteSessionManager#isSubscribed() subscribed} and a remote session
+ * {@link CDORemoteSession#isSubscribed() unsubscribed} from the same repository as the local session.
+ */
protected void onUnsubscribed(CDORemoteSession remoteSession)
{
}
+ /**
+ * Called if the local session is {@link CDORemoteSessionManager#isSubscribed() subscribed} and a remote session
+ * {@link CDORemoteSession#sendCustomData(String, byte[]) sent} custom data to the local session.
+ */
protected void onCustomData(CDORemoteSession remoteSession, String type, byte[] data)
{
}

Back to the top