Package org.eclipse.ecf.core.util

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


   */
  public void fireAsync(final IRemoteCall call) throws ECFException {
    try {
      callAsync(call);
    } catch (RemoteOSGiException r) {
      throw new ECFException(r);
    } catch (Throwable t) {
      // do not rethrow
    }
  }
View Full Code Here


   * @return the service proxy object.
   * @see org.eclipse.ecf.remoteservice.IRemoteService#getProxy()
   */
  public Object getProxy() throws ECFException {
    if (!refImpl.getR_OSGiServiceReference().isActive()) {
      throw new ECFException("Container currently not connected"); //$NON-NLS-1$
    }
    return super.getProxy();
  }
View Full Code Here

    return conn;
  }

  protected void traceAndThrowECFException(String msg, Throwable t)
      throws ECFException {
    throw new ECFException(msg, t);
  }
View Full Code Here

  }

  public void sendPresenceUpdate(ID toID, IPresence presence)
      throws ECFException {
    if (presence == null || client == null) {
      throw new ECFException();
    }

    IPresence.Mode mode = presence.getMode();
    try {
      client.setPersonalMessage(presence.getStatus());
      if (presence.getType() == IPresence.Type.UNAVAILABLE) {
        disconnect();
      } else if (mode == IPresence.Mode.AVAILABLE
          || mode == IPresence.Mode.CHAT) {
        client.setStatus(Status.ONLINE);
      } else if (mode == IPresence.Mode.AWAY
          || mode == IPresence.Mode.EXTENDED_AWAY) {
        client.setStatus(Status.AWAY);
      } else if (mode == IPresence.Mode.DND) {
        client.setStatus(Status.BUSY);
      } else {
        client.setStatus(Status.APPEAR_OFFLINE);
      }
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here

        cs.addChatSessionListener(new ChatSessionListener(toID));
        chatSessions.put(toID, cs);
      }
      cs.sendMessage(body);
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here

          chatSessions.put(toID, cs);
        }
        cs.sendTypingNotification();
      }
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here

  public void sendRosterAdd(String user, String name, String[] groups)
      throws ECFException {
    try {
      client.getContactList().addContact(user, name);
    } catch (IOException e) {
      throw new ECFException(e);
    }
  }
View Full Code Here

    MSNRosterEntry entry = findEntry(entries, userID.getName());
    if (entry != null) {
      try {
        client.getContactList().removeContact(entry.getContact());
      } catch (IOException e) {
        throw new ECFException(e);
      }
    }
  }
View Full Code Here

  private static final String NOT_CONNECTED = "not connected";

  private AccountManager accountManager = null;

  protected void traceAndThrow(String msg, Throwable t) throws ECFException {
    throw new ECFException(msg, t);
  }
View Full Code Here

  }

  protected AccountManager getAccountManagerOrThrowIfNull()
      throws ECFException {
    if (accountManager == null)
      throw new ECFException(NOT_CONNECTED);
    return accountManager;
  }
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.