Package org.eclipse.ecf.core.sharedobject

Examples of org.eclipse.ecf.core.sharedobject.ISharedObjectContext.sendMessage()


     
      subscribers.remove(requestorID);
      if (subscribers.isEmpty()) {
        ISharedObjectContext ctx = config.getContext();
        try {
          ctx.sendMessage(config.getHomeContainerID(), new UnsubscribeMessage());
        } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
       
View Full Code Here


      try {
        if (subscriptions.add(containerID)) {
          ctx.sendCreate(containerID, createRemoteAgentDescription(requestorID));
        } else {
          SubscribeMessage msg = new SubscribeMessage(requestorID);
          ctx.sendMessage(containerID, SerializationUtil.serialize(msg));
        }
      } catch (IOException e) {
        // TODO Log me!
        e.printStackTrace();
      }
View Full Code Here

    if (object instanceof IPublishedService) {
      IPublishedService svc = (IPublishedService) object;
      Map props = svc.getProperties();
      PublishedServiceDescriptor desc = new PublishedServiceDescriptor(ctx.getLocalContainerID(), sharedObjectID, props);
      try {
        ctx.sendMessage(config.getHomeContainerID(), SerializationUtil.serialize(new DiscoveryMessage(DiscoveryMessage.ADDED, desc)));
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
View Full Code Here

    if (object instanceof IPublishedService) {
      IPublishedService svc = (IPublishedService) object;
      Map props = svc.getProperties();
      PublishedServiceDescriptor desc = new PublishedServiceDescriptor(ctx.getLocalContainerID(), sharedObjectID, props);
      try {
        ctx.sendMessage(config.getHomeContainerID(), SerializationUtil.serialize(new DiscoveryMessage(DiscoveryMessage.REMOVED, desc)));
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
View Full Code Here

        return;
     
      PublishedServiceDescriptor[] descriptors = new PublishedServiceDescriptor[published.size()];
      published.toArray(descriptors);
      try {
        ctx.sendMessage(config.getHomeContainerID(), SerializationUtil.serialize(new DiscoveryMessage(DiscoveryMessage.ADDED, descriptors)));
      } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
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.