Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.IContainer


    final TextSelection selection = ConsoleShare.getSelection();
    if (selection == null)
      return null;
    // Else check for Roster entry
    final IRosterEntry entry = getSelectedRosterEntry();
    final IContainer c = getContainerForRosterEntry(entry);
    // If roster entry is selected and it has a container
    if (entry != null && c != null) {
      final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class);
      // If the container has channel container adapter and is online/available
      if (channelAdapter != null && isAvailable(entry)) {
        final ConsoleShare tmp = ConsoleShare.getStackShare(c.getID());
        // If there is an URL share associated with this container
        if (tmp != null) {
          final ConsoleShare stackshare = tmp;
          final IAction action = new Action() {
            public void run() {
View Full Code Here


  }

  private void retrieveServices() {
    IPresenceService[] services = Activator.getDefault().getPresenceServices();
    for (int i = 0; i < services.length; i++) {
      IContainer container = (IContainer) services[i].getAdapter(IContainer.class);
      if (container != null && container.getConnectedID() != null) {
        addContainer(container);
      }
    }
  }
View Full Code Here

      return;
    // Get selected room, selected manager, and selected IChatRoomInfo
    IChatRoomInfo selectedInfo = dialog.getSelectedRoom().getRoomInfo();
    MultiRosterAccount account = dialog.getSelectedRoom().getAccount();
    // Now get the secondary ID from the selected room id
    final IContainer container = account.getContainer();
    final ID connectedID = container.getConnectedID();
    if (connectedID == null) {
      MessageDialog.openError(getViewSite().getShell(), Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_TITLE, NLS.bind(Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_MESSAGE, selectedInfo.getRoomID()));
      return;
    }
View Full Code Here

      }
    });
  }

  IRosterManager getLocalRosterManager() {
    IContainer container = (IContainer) this.adapter.getAdapter(IContainer.class);
    if (container != null) {
      IPresenceContainerAdapter presenceContainerAdapter = (IPresenceContainerAdapter) container.getAdapter(IPresenceContainerAdapter.class);
      if (presenceContainerAdapter != null) {
        return presenceContainerAdapter.getRosterManager();
      }
    }
    return null;
View Full Code Here

public class RemoteServiceHandlerUtil {

  public static IRemoteServiceContainerAdapter getActiveIRemoteServiceContainerAdapterChecked(
      ExecutionEvent event) throws ExecutionException {
    final ID activeConnectId = getActiveConnectIDChecked(event);
    final IContainer container = getContainerWithConnectID(activeConnectId);
    if (container == null) {
      return null;
    }
    final IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) container
        .getAdapter(IRemoteServiceContainerAdapter.class);
    return adapter;
  }
View Full Code Here

  public static IContainer getActiveIRemoteServiceContainerChecked(
      ExecutionEvent event) throws ExecutionException {
    final IServiceInfo serviceInfo = DiscoveryHandlerUtil
        .getActiveIServiceInfoChecked(event);
    final ID createConnectId = getActiveConnectIDChecked(event);
    final IContainer container = getContainerWithConnectID(createConnectId);
    if (container != null) {
      return container;
    }
    // TODO remove parameters once
    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=256586 is fixed
View Full Code Here

    return container;
  }
 
  private IRemoteServiceContainerAdapter getContainerAdapter() throws ContainerCreateException {
    if (adapter == null) {
      IContainer c = getContainer();
      adapter = (IRemoteServiceContainerAdapter) c.getAdapter(IRemoteServiceContainerAdapter.class);
    }
    return adapter;
  }
View Full Code Here

  /**
   * @param serviceRegistration disconnects the underlying IContainer and unregisters the service
   */
  private void disposeServiceRegistration(ServiceRegistration serviceRegistration) {
    final ServiceReference reference = serviceRegistration.getReference();
    final IContainer aContainer = (DnsSdDiscoveryContainerAdapter) context.getService(reference);
   
    serviceRegistration.unregister();
    final IContainer container = (IContainer) aContainer.getAdapter(IContainer.class);
    container.dispose();
    container.disconnect();
  }
View Full Code Here

public class GenericConcatConsumerTest extends AbstractConcatConsumerTestCase {

  protected void setUp() throws Exception {
    super.setUp();
    IContainer container = createContainer();
    rsContainer = createRemoteServiceContainer(container);
    targetID = createID(container, Generic.HOST_CONTAINER_ENDPOINT_ID);
  }
View Full Code Here

  protected String getClientContainerName() {
    return XMPP_CONTAINER;
  }

  protected ISendFileTransferContainerAdapter getOutgoingFileTransfer(int client) {
    final IContainer c = getClient(client);
    if (c != null)
      return (ISendFileTransferContainerAdapter) c.getAdapter(ISendFileTransferContainerAdapter.class);
    else
      return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.IContainer

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.