Package org.eclipse.ecf.datashare

Examples of org.eclipse.ecf.datashare.IChannelContainerAdapter.createChannel()


          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);
  }
  protected void openScribbleView() {
View Full Code Here


    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());
  }
 
  public void createAndConnect() throws ECFException {
    // create container instance from ECF ContainerFactory
    container = ContainerFactory.getDefault().createContainer(CONTAINER_TYPE);
View Full Code Here

    };
    // Create channel config information
    IChannelConfig config = new BaseChannelConfig(channelID,
            channelListener, new HashMap());
    // Create and return new channel
    return channelContainer.createChannel(config);
  }
 
  protected void showMessageInUI(final String message) {
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
View Full Code Here

    clients = createClients();
    channelID = IDFactory.getDefault().createStringID(CHANNEL_NAME);
    connectClients();
    for (int i = 0; i < clientCount; i++) {
      final IChannelContainerAdapter channelContainer = getChannelContainer(i);
      channelContainer.createChannel(channelID, getIChannelListener(getContainerID(i)), null);
    }
  }

  protected ID getServerConnectID(int client) {
    try {
View Full Code Here

   *
   */
  protected void addChannelToClients() throws Exception {
    for (int i = 0; i < clientCount; i++) {
      final IChannelContainerAdapter channelContainer = getChannelContainer(i);
      channelContainer.createChannel(getNewID(CHANNEL_NAME), getIChannelListener(getContainerID(i)), null);
    }
  }

  protected void clearClientEvents() {
    messageEvents.clear();
View Full Code Here

    assertNotNull(channelContainer);
  }

  public void testCreateChannel() throws Exception {
    final IChannelContainerAdapter channelContainer = getChannelContainer(0);
    final IChannel channel = channelContainer.createChannel(getNewID(CHANNEL_NAME_1), getIChannelListener(getContainerID(0)), null);
    assertNotNull(channel);
    assertNotNull(channel.getID());
    assertNotNull(channel.getListener());
  }
View Full Code Here

    assertNotNull(channel.getListener());
  }

  public void testGetChannelFromContainer() throws Exception {
    final IChannelContainerAdapter channelContainer = getChannelContainer(0);
    channelContainer.createChannel(getNewID(CHANNEL_NAME_1), getIChannelListener(getContainerID(0)), null);
    assertNotNull(channelContainer.getChannel(getNewID(CHANNEL_NAME_1)));
  }

  public void testGetChannelNamespace() throws Exception {
    final IChannelContainerAdapter channelContainer = getChannelContainer(0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.