Package org.eclipse.ecf.core.util

Examples of org.eclipse.ecf.core.util.ECFException


  protected IFuture callAsync(final IRemoteCall call, final IRemoteCallable callable) {
    final AbstractExecutor executor = new ThreadsExecutor();
    return executor.execute(new IProgressRunnable() {
      public Object run(IProgressMonitor monitor) throws Exception {
        if (callable == null)
          throw new ECFException("Callable not found"); //$NON-NLS-1$
        return invokeRemoteCall(call, callable);
      }
    }, null);
  }
View Full Code Here


      return null;
    }
  }

  protected void handleInvokeException(String message, Throwable e) throws ECFException {
    throw new ECFException(message, e);
  }
View Full Code Here

        });
      }

      try {
        if (callable == null)
          throw new ECFException("Restcall not found for method=" + call.getMethod()); //$NON-NLS-1$
        r = invokeRemoteCall(call, callable);
      } catch (Throwable t) {
        e = t;
      }
View Full Code Here

  }

  protected void doSendSubjectChangeMessage(String channelName, String topic)
      throws ECFException {
    if (connection == null)
      throw new ECFException(
          Messages.IRCRootContainer_Exception_Unexplained_Disconnect);
    connection.doTopic(channelName, topic);
  }
View Full Code Here

  }

  public void sendInvitation(ID room, ID targetUser, String subject,
      String body) throws ECFException {
    if (connection == null)
      throw new ECFException(
          Messages.IRCRootContainer_EXCEPTION_CONNECTION_CANNOT_BE_NULL);
    connection.doInvite(targetUser.getName(), room.getName());
  }
View Full Code Here

   *            identifier of the graph that was published
   * @throws ECFException
   */
  public synchronized void add(ID graphID) throws ECFException {
    if (config == null)
      throw new ECFException("Not initialized.");

    // wait to be activated before proceeding
    synchronized (activationMutex) {
      if (!activated)
        try {
          activationMutex.wait(1000);
        } catch (InterruptedException e) {
          throw new ECFException(e);
        }

      if (!activated)
        throw new ECFException("Not activated.");
    }

    // tell everyone a graph was published
    try {
      getContext().sendMessage(null,
          new Object[] { new Integer(ADD), graphID });
    } catch (IOException e) {
      throw new ECFException(e);
    }

    // track it yourself
    handleAdd(getContext().getLocalContainerID(), graphID);
  }
View Full Code Here

   * @param body
   */
  protected void sendInvitation(ID room, ID targetUser, String subject, String body) throws ECFException {
    final XMPPChatRoomContainer chatRoomContainer = getChatRoomContainer(room);
    if (chatRoomContainer == null)
      throw new ECFException(NLS.bind(Messages.XMPPChatRoomManager_ROOM_NOT_FOUND, room.getName()));
    chatRoomContainer.sendInvitation(targetUser, subject, body);
  }
View Full Code Here

                consumer, mutex);
        ID containerID = null;
        try {
            containerID = mutex.waitForSubscription(5000);
        } catch (InterruptedException e) {
            throw new ECFException(e);
        }

        if (containerID == null)
            throw new ECFException("Subscription timed out.");

        tracker.add(id);
        return result;
    }
View Full Code Here

        ISharedDataGraph result = DataGraphSharingFactory.getDataGraphSharing(
                container, "default").publish(dataGraph, id,
                new EMFUpdateProvider(), consumer, mutex);
        try {
            if (!mutex.waitForPublication(5000))
                throw new ECFException("Publication timed out.");
        } catch (InterruptedException e) {
            throw new ECFException(e);
        }

        tracker.add(id);
        return result;
    }
View Full Code Here

    }

    public synchronized void checkConnected(IProject project)
            throws ECFException {
        if (getContainer(project) == null)
            throw new ECFException("Project " + project.getName()
                    + " is not connected.");
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.util.ECFException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.