Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.IContainer


   */
  protected IRemoteServiceContainer createRSContainer(
      ServiceReference serviceReference, Map<String, Object> properties,
      ContainerTypeDescription containerTypeDescription)
      throws SelectContainerException {
    IContainer container = createContainer(serviceReference, properties,
        containerTypeDescription);
    IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) container
        .getAdapter(IRemoteServiceContainerAdapter.class);
    if (adapter == null)
      throw new SelectContainerException(
          "Container does not implement IRemoteServiceContainerAdapter", null, containerTypeDescription); //$NON-NLS-1$
    return new RemoteServiceContainer(container, adapter);
View Full Code Here


   * #getJob()
   */
  protected Job getJob(final ExecutionEvent event) throws ExecutionException {
    final ID createConnectId = RemoteServiceHandlerUtil
        .getActiveConnectIDChecked(event);
    final IContainer container = RemoteServiceHandlerUtil
        .getActiveIRemoteServiceContainerChecked(event);
    // decouple the long running connect call from the ui thread
    return new Job(NLS.bind("Connecting {0}", createConnectId.getName())) {
      protected IStatus run(IProgressMonitor monitor) {
        if (container == null)
          return Status.OK_STATUS;
        container.disconnect();
        return Status.OK_STATUS;
      }
    };
  }
View Full Code Here

public class ConnectRemoteServicehandler extends ConnectionHandler {

  protected Job getJob(final ExecutionEvent event) throws ExecutionException {
    final ID createConnectId = RemoteServiceHandlerUtil
        .getActiveConnectIDChecked(event);
    final IContainer container = RemoteServiceHandlerUtil
        .getActiveIRemoteServiceContainerChecked(event);
    // decouple the long running connect call from the ui thread
    return new Job(NLS.bind("Connecting {0}", createConnectId.getName())) {
      protected IStatus run(IProgressMonitor monitor) {
        try {
          if (container != null)
            container.connect(createConnectId, null);
        } catch (ContainerConnectException e) {
          showException(e);
          return Status.CANCEL_STATUS;
        }
        return Status.OK_STATUS;
View Full Code Here

  private URLShare getURLShare(IRosterEntry rosterEntry1) {
    final IPresenceContainerAdapter pca = rosterEntry1.getRoster().getPresenceContainerAdapter();
    if (pca == null)
      return null;
    final IContainer container = (IContainer) pca.getAdapter(IContainer.class);
    if (container == null)
      return null;
    return URLShare.getURLShare(container.getID());
  }
View Full Code Here

  }

  protected IAction[] makeActions() {
    // 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 ViewShare tmp = ViewShare.getViewShare(c.getID());
        // If there is an URL share associated with this container
        if (tmp != null) {
          final ViewShare viewshare = tmp;
          final IAction action = new Action() {
            public void run() {
View Full Code Here

  }

  protected IAction[] makeActions() {
    // 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 URLShare tmp = URLShare.getURLShare(c.getID());
        // If there is an URL share associated with this container
        if (tmp != null) {
          final URLShare urlshare = tmp;
          final IAction action = new Action() {
            public void run() {
View Full Code Here

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing ViewShare for this container (if it exists)
        final ViewShare viewShare = ViewShare.getViewShare(c.getID());
        // If it does exist already, then create action to remove
        if (viewShare != null)
          return createActionRemove(c.getID(), viewShare);
        final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class);
        return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter);
      }
    }
    return null;
  }
View Full Code Here

  }

  protected IAction[] makeActions() {
    // 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 ScreenCaptureShare tmp = ScreenCaptureShare.getScreenCaptureShare(c.getID());
        // If there is an URL share associated with this container
        if (tmp != null) {
          final ScreenCaptureShare screencaptureshare = tmp;
          final IAction action = new Action() {
            public void run() {
View Full Code Here

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing urlshare for this container (if it exists)
        final URLShare urlshare = URLShare.getURLShare(c.getID());
        // If it does exist already, then create action to remove
        if (urlshare != null)
          return createActionRemove(c.getID(), urlshare);
        final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class);
        return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter);
      }
    }
    return null;
  }
View Full Code Here

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing ScreenCaptureShare for this container (if it exists)
        final ScreenCaptureShare screenCaptureShare = ScreenCaptureShare.getScreenCaptureShare(c.getID());
        // If it does exist already, then create action to remove
        if (screenCaptureShare != null)
          return createActionRemove(c.getID(), screenCaptureShare);
        final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class);
        return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter);
      }
    }
    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.