Examples of SharedObjectDescription


Examples of org.eclipse.ecf.core.sharedobject.SharedObjectDescription

    });
  }

  public IMergeableChannel createChannel(IChannelConfig newChannelConfig) throws ECFException {
    final IChannelListener listener = newChannelConfig.getListener();
    final SharedObjectDescription sodesc = new SharedObjectDescription(FeedSharedObject.class, IDFactory.getDefault().createGUID(), new HashMap());
    final SharedObjectTypeDescription sotypedesc = sodesc.getTypeDescription();
    ISharedObject sharedObject = null;
    if (sotypedesc.getName() != null) {
      sharedObject = SharedObjectFactory.getDefault().createSharedObject(sotypedesc, new Object[] {listener});
    } else {
      sharedObject = createSharedObject(sotypedesc, listener);
    }
    final IMergeableChannel channel = (IMergeableChannel) sharedObject.getAdapter(IMergeableChannel.class);
    if (channel == null) {
      throw new SharedObjectCreateException("Cannot coerce object " + channel + " to be of type IChannel");
    }
    ID newID = sodesc.getID();
    if (newID == null) {
      newID = IDFactory.getDefault().createGUID();
    }
    Map properties = sodesc.getProperties();
    if (properties == null) {
      properties = new HashMap();
    }
    // Now add channel to container...this will block
    getSharedObjectManager().addSharedObject(newID, sharedObject, properties);
View Full Code Here

Examples of org.eclipse.ecf.core.sharedobject.SharedObjectDescription

      id = IDFactory.getDefault().createGUID();
    } catch (IDCreateException e) {
      throw new RuntimeException(e);
    }
   
    return new SharedObjectDescription(SubscriptionAgent.class, id, props);
  }
View Full Code Here

Examples of org.eclipse.ecf.core.sharedobject.SharedObjectDescription

    IPublishedServiceDirectory directory = (IPublishedServiceDirectory) mgr.getSharedObject(directoryID);
    if (directory != null)
      return directory;
   
    try {
      SharedObjectDescription desc = createDirectoryDescription(directoryID);
      mgr.createSharedObject(desc);
      return (IPublishedServiceDirectory) mgr.getSharedObject(directoryID);
    } catch (SharedObjectCreateException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of org.eclipse.ecf.core.sharedobject.SharedObjectDescription

      return null;
    }
  }
 
  protected SharedObjectDescription createDirectoryDescription(ID directoryID) {
    return new SharedObjectDescription(PublishedServiceDirectory.class, directoryID, null);
  }
View Full Code Here

Examples of org.eclipse.ecf.core.sharedobject.SharedObjectDescription

  }

  protected SharedObjectDescription createDiscoveryAgentDescription() {
    HashMap props = new HashMap(1);
    props.put(DiscoveryAgent.DIRECTORY_KEY, this);
    return new SharedObjectDescription(DiscoveryAgent.class, discoveryAgentID, props);
  }
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.