Examples of XCATComponentID


Examples of intf.ccacore.XCATComponentID

   *    serialization of a ComponentID for the underlying framework.
   */
  public gov.cca.ComponentID getDeserialization(java.lang.String s)
    throws gov.cca.CCAException {
    logger.finest("called");
      XCATComponentID componentID = (XCATComponentID)
  HandleResolver.resolveHandle(s, XCATComponentID.class.getName());

      return componentID;
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

   
    if (!(connID.getProvider() instanceof XCATComponentID) ||
  !(connID.getUser() instanceof XCATComponentID))
      throw new NonstandardException("ComponentIDs not instances of XCATComponentID");

    XCATComponentID provider = (XCATComponentID) connID.getProvider();
    XCATComponentID user = (XCATComponentID) connID.getUser();

    // remove the connection of the user's side
    user.disconnectProvider(connID.getUserPortName());

    // notify the provider's side
    provider.disconnectUser(connID.getProviderPortName());
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

    String componentHandle =
      properties.getString("componentHandle",
         HandleResolver.createGSH(instanceName));

    XCATContainer container = null;
    XCATComponentID cid = null;
    if (componentType.equals("basic")) {
      container = new BasicContainer();

      // Instantiate the component
      container.createComponentInstance(instanceName,
          componentHandle,
          className);     
      // Create an instance of the client side of XCATComponentID
      cid = new XCATComponentIDClientImpl(instanceName, componentHandle);
    } else if (componentType.equals("mobile")) {
      container = new MobileContainer();

      if (properties.getBool("isMigrated", false))
  ((MobileContainer) container).setIsMigrated();

      // Instantiate the component
      container.createComponentInstance(instanceName,
          componentHandle,
          className);     
      // Create an instance of the client side of XCATComponentID
      cid = new MobileComponentIDClientImpl(instanceName, componentHandle);
    } else
      throw new NonstandardException("Unknown componentType: " + componentType);

    // transfer the properties object to the component
    cid.setProperties(TypeUtil.toXML(properties));

    // update the namedComponentIDs hashMap
    namedComponentIDs.put(instanceName, cid);
   
    // return the ComponentID
View Full Code Here

Examples of intf.ccacore.XCATComponentID

      logger.severe("Can not launch remote component", e);
      throw new NonstandardException("Can not launch remote component", e);
    }

    // initialize XCATComponentIDClient with a null GSH
    XCATComponentID cid = null;
    if (componentType.equals("basic"))
      cid = new XCATComponentIDClientImpl(instanceName, null);
    else if (componentType.equals("mobile"))
      cid = new MobileComponentIDClientImpl(instanceName, null);
    else // shouldn't get here, since we have thrown this exception before
      throw new NonstandardException("Unknown componentType: " + componentType);

    // insert into the namedComponentIDs hashMap
    namedComponentIDs.put(instanceName, cid);

    synchronized(cid) {
      if (cid.getSerialization() == null)
  try {
    logger.finest("waiting to receive ComponentID");

    // wait to receive the ComponentID from remote component
    long timeout = properties.getLong("timeout", DEFAULT_TIMEOUT);
    logger.finest("received timeout: " + timeout);
    cid.wait(timeout);
 
    logger.finest("woken up after waiting to receive ComponentID");
  } catch (InterruptedException ie) {
    logger.severe(ie.toString(), ie);
  }
    }

    // check if the ComponentiD has been received
    if (cid.getSerialization() == null)
      throw new NonstandardException("Timed out while receiving ComponentID");

    // transfer the properties object to the component
    cid.setProperties(TypeUtil.toXML(properties));

    // return the ComponentID from the namedComponentIDs hashMap
    return cid;
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

      logger.severe("Can not launch remote component", e);
      throw new NonstandardException("Can not launch remote component", e);
    }

    // initialize XCATComponentIDClient with a null GSH
    XCATComponentID cid = null;
    if (componentType.equals("basic"))
      cid = new XCATComponentIDClientImpl(instanceName, null);
    else if (componentType.equals("mobile"))
      cid = new MobileComponentIDClientImpl(instanceName, null);
    else // shouldn't get here, since we have thrown this exception before
      throw new NonstandardException("Unknown componentType: " + componentType);
   
    // insert into the namedComponentIDs hashMap
    namedComponentIDs.put(instanceName, cid);

    synchronized(cid) {
      if (cid.getSerialization() == null)
  try {
    logger.finest("waiting to receive ComponentID");

    // wait to receive the ComponentID from remote component
    long timeout = properties.getLong("timeout", DEFAULT_TIMEOUT);
    logger.finest("received timeout: " + timeout);
    cid.wait(timeout);
 
    logger.finest("woken up after waiting to receive ComponentID");
  } catch (InterruptedException ie) {
    logger.severe(ie.toString(), ie);
  }
    }

    // check if the ComponentiD has been received
    if (cid.getSerialization() == null)
      throw new NonstandardException("Timed out while receiving ComponentID");

    // transfer the properties object to the component
    cid.setProperties(TypeUtil.toXML(properties));

    // return the ComponentID from the namedComponentIDs hashMap
    return cid;
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

  public String[] getProvidedPortNames()
    throws gov.cca.CCAException {
    logger.finest("called");

    // make a remote invocation on the server side
    XCATComponentID remote =
      (XCATComponentID) HandleResolver.resolveHandle(componentHandle,
                 XCATComponentID.class.getName());
    return remote.getProvidedPortNames();
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

  public String[] getUsedPortNames()
    throws gov.cca.CCAException {
    logger.finest("called");

    // make a remote invocation on the server side
    XCATComponentID remote =
      (XCATComponentID) HandleResolver.resolveHandle(componentHandle,
                 XCATComponentID.class.getName());
    return remote.getUsedPortNames();
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

  public String getProvidesPortType(String providesPortName)
    throws gov.cca.CCAException {
    logger.finest("called for port: " + providesPortName);

    // make a remote invocation on the server side
    XCATComponentID remote =
      (XCATComponentID) HandleResolver.resolveHandle(componentHandle,
                 XCATComponentID.class.getName());
    return remote.getProvidesPortType(providesPortName);
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

  public String getUsesPortType(String usesPortName)
    throws gov.cca.CCAException {
    logger.finest("called for port: " + usesPortName);

    // make a remote invocation on the server side
    XCATComponentID remote =
      (XCATComponentID) HandleResolver.resolveHandle(componentHandle,
                 XCATComponentID.class.getName());
    return remote.getUsesPortType(usesPortName);
  }
View Full Code Here

Examples of intf.ccacore.XCATComponentID

  public String getPortHandle(String providesPortName)
    throws gov.cca.CCAException {
    logger.finest("called for provides port: " + providesPortName);

    // make a remote invocation on the server side
    XCATComponentID remote =
      (XCATComponentID) HandleResolver.resolveHandle(componentHandle,
                 XCATComponentID.class.getName());
    return remote.getPortHandle(providesPortName);
  }
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.