Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.IContainerManager


  private void createAndConfigureHostContainer(BundleContext context) throws Exception {
    // Get IContainerManager singleton
    ServiceTracker<IContainerManager,IContainerManager> containerManagerTracker = new ServiceTracker<IContainerManager,IContainerManager>(context,IContainerManager.class.getName(), null);
    containerManagerTracker.open();
    IContainerManager containerManager = containerManagerTracker.getService();
    if (containerManager == null) throw new NullPointerException("Cannot get IContainerManager service");
    containerManagerTracker.close();
   
    // Now create a hostContainer instance
    hostContainer = containerManager.getContainerFactory().createContainer("ecf.generic.server");
    // Get the ISharedObjectContainerGroupManager adapter interface
    ISharedObjectContainerGroupManager hostManager = (ISharedObjectContainerGroupManager) hostContainer.getAdapter(ISharedObjectContainerGroupManager.class);
    // Set connect policy
    hostManager.setConnectPolicy(new IConnectHandlerPolicy() {
      public void refresh() {
View Full Code Here


     */
    public void start(BundleContext bundleContext) throws Exception {

        Activator.context = bundleContext;

        IContainerManager containerManager = getContainerManagerService();

        container = containerManager.getContainerFactory().createContainer(REST_CONTAINER_TYPE,
                getRestID(RSS_URL));

        adapter = getRestClientContainerAdapter();

        adapter.setResponseDeserializer(new SyndFeedResponseDeserializer());
View Full Code Here

   * from the application context.
   */
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);

    IContainerManager containerManager = Activator.getDefault().getContainerManager();
    IContainer[] containers = containerManager.getAllContainers();

    BrowseDialog dialog = new BrowseDialog(window.getShell(), containers);
    int status = dialog.open();
    if (status == Window.OK) {
      Object[] object = dialog.getResult();
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.ecf.core.sharedobject.BaseSharedObject#getAdapter(java.lang.Class)
   */
  public Object getAdapter(Class adapter) {
    if (adapter != null && adapter.isAssignableFrom(IContainer.class)) {
      IContainerManager containerManager = Activator.getDefault().getContainerManager();
      return containerManager.getContainer(getContext().getLocalContainerID());
    }
    return super.getAdapter(adapter);
  }
View Full Code Here

   * )
   */
  public void start(BundleContext context) throws Exception {
    this.context = context;
    // Create R-OSGi Container
    IContainerManager containerManager = getContainerManagerService();
    container = containerManager.getContainerFactory().createContainer(
        "ecf.r_osgi.peer");
    // Get remote service container adapter
    IRemoteServiceContainerAdapter containerAdapter = (IRemoteServiceContainerAdapter) container
        .getAdapter(IRemoteServiceContainerAdapter.class);
    // Register remote service
View Full Code Here

  private static final IContainer[] EMPTY = new IContainer[0];

  boolean isXMPPS;

  protected IContainer[] getContainers() {
    final IContainerManager manager = Activator.getDefault().getContainerManager();
    if (manager == null)
      return EMPTY;
    final List results = new ArrayList();
    final IContainer[] containers = manager.getAllContainers();
    for (int i = 0; i < containers.length; i++) {
      final ID connectedID = containers[i].getConnectedID();
      // Must be connected and ID of correct type
      if (connectedID != null && ((isXMPPS && containers[i] instanceof XMPPSContainer) || (!isXMPPS && containers[i] instanceof XMPPContainer)))
        results.add(containers[i]);
View Full Code Here

   * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    this.context = context;
    // 1. Create R-OSGi Container
    IContainerManager containerManager = getContainerManagerService();
    container = containerManager.getContainerFactory().createContainer(
        "ecf.r_osgi.peer");
    // 2. Get remote service container adapter
    IRemoteServiceContainerAdapter containerAdapter = (IRemoteServiceContainerAdapter) container
        .getAdapter(IRemoteServiceContainerAdapter.class);
    // 3. Lookup IRemoteServiceReference
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.IContainerManager

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.