Package org.eclipse.ecf.datashare

Examples of org.eclipse.ecf.datashare.IChannelContainerAdapter


    // 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) {
View Full Code Here


    // 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) {
View Full Code Here

        // 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

    // 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) {
View Full Code Here

        // 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

        // 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

    // 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) {
View Full Code Here

  IContainer container = null;
  ScribbleView scribbleView = null;
 
  protected void createChannel() throws ECFException {
    // Get IChannelContainerAdapter adapter
    IChannelContainerAdapter channelContainer = (IChannelContainerAdapter) container
        .getAdapter(IChannelContainerAdapter.class);
    // Create channel ID with fixed name 'channel2'
    final ID channelID = IDFactory.getDefault().createID(
        channelContainer.getChannelNamespace(), CHANNEL_ID);
    // Setup listener so then when channelmessageevents are received that
    // they present in UI
    final IChannelListener channelListener = new IChannelListener() {
      public void handleChannelEvent(final IChannelEvent event) {
        if (event instanceof IChannelMessageEvent) {
          IChannelMessageEvent msg = (IChannelMessageEvent) event;
          scribbleView.handleDrawLine(msg.getData());
        }
      }
    };
    // Create new channel
    IChannel channel = channelContainer.createChannel(channelID,
        channelListener, new HashMap());
    // Set the view to use the given channel (for sending)
    scribbleView.setChannel(channel);
  }
View Full Code Here

 
  IContainer container = null;
  IChannel channel = null;
 
  protected IChannel createChannel(IContainer container) throws ECFException {
    IChannelContainerAdapter channelContainer = (IChannelContainerAdapter) container.getAdapter(IChannelContainerAdapter.class);
    if (channelContainer == null) throw new NullPointerException("cannot get channel container adapter");
   
    ID channelID = IDFactory.getDefault().createID(channelContainer.getChannelNamespace(), "channel1");
    IChannelListener channelListener = new IChannelListener() {
      public void handleChannelEvent(IChannelEvent event) {
        System.out.println("handleChannelEvent("+event+")");
      }};
    return channelContainer.createChannel(channelID, channelListener, new HashMap());
  }
View Full Code Here

  IContainer container = null;
  IChannel channel = null;
 
  protected IChannel createChannel(IContainer container) throws ECFException {
    // Get IChannelContainerAdapter adapter
    IChannelContainerAdapter channelContainer = (IChannelContainerAdapter) container
        .getAdapter(IChannelContainerAdapter.class);
    // Check it's valid, throw if not
    if (channelContainer == null)
      throw new NullPointerException(
          "cannot get channel container adapter");
    // Create channel ID with fixed name 'channel2'
    final ID channelID = IDFactory.getDefault().createID(
        channelContainer.getChannelNamespace(), "channel2");
    // Setup listener so then when channelmessageevents are received that
    // they present in UI
    final IChannelListener channelListener = new IChannelListener() {
      public void handleChannelEvent(final IChannelEvent event) {
        if (event instanceof IChannelMessageEvent) {
          IChannelMessageEvent msg = (IChannelMessageEvent) event;
          showMessageInUI(new String(msg.getData()));
        } else System.out.println("got channel event " + event);
      }
    };
    // Create channel config information
    IChannelConfig config = new BaseChannelConfig(channelID,
            channelListener, new HashMap());
    // Create and return new channel
    return channelContainer.createChannel(config);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.datashare.IChannelContainerAdapter

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.