Package xcat.exceptions

Examples of xcat.exceptions.NonstandardException


    if (LocalServiceRegistry.containsService(handle))
      reference = (XCATPort) LocalServiceRegistry.getServiceImpl(handle);
    else {
      // make sure the handleResolver exists
      if (handleResolverURL == null)
  throw new NonstandardException("Unable to locate a Handle Resolver implementation");

      // Use the real HandleResolver to get a reference
      LocatorType portLocator = null;
     
      try {
  portLocator = ClientUtil.findByHandle(handleResolverURL,
                handle);
      } catch (Exception e) {
  logger.severe("Exception while trying to find a Reference via Handle",
          e);
  throw new NonstandardException("Exception while trying to find a Reference via Handle",
               e);
      }

      ReferenceType[] portRef = portLocator.getReferenceArray();
     
      if (portRef.length > 0) {
  String portGSR = XmlUtil.getChildOf(portRef[0]);
  if (portGSR != null) {
    try {
      // reference = (XCATPort) WSDLUtil.convertWSDLToRef(portGSR);
      reference =
        (XCATPort) SoapServices.getDefault().createStartpointFromXml(portGSR);
    } catch (Exception e) {
      // logger.severe("Can not convert WSDL to XSOAP Reference", e);
      // throw new NonstandardException("Can not convert WSDL to XSOAP Reference",
      //                    e);
      logger.severe("Can not convert stringified reference to XCATPort", e);
      throw new NonstandardException("Can not convert stringified reference to XCATPort",
             e);
    }
  } else {
    logger.severe("Reference for " + handle +
      " found to be null");
    throw new NonstandardException("Reference for " + handle +
           " found to be null");
  }
      } else {
  logger.severe("No reference found for " + handle +
          " in Resolver: " + handleResolverURL);
  throw new NonstandardException("No reference found for " + handle +
               " in Resolver: " + handleResolverURL);
      }
    }
   
    // check if the returned object has the expected interface
    logger.finest("Returned class: " + reference.getClass().getName());
    try {
      if (!(Class.forName(intfClassName).isAssignableFrom(reference.getClass())))
  throw new NonstandardException("Returned reference is not an instance of " +
               intfClassName);
    } catch (ClassNotFoundException cnfe) {
      logger.severe("Can't verify if returned class conforms to specified interface",
        cnfe);
      throw new NonstandardException("Can't verify if returned class conforms " +
             "to specified interface", cnfe);
    }

    long end = System.currentTimeMillis();
    logger.finest("Time for handle resolution for " + intfClassName +
View Full Code Here


  componentIDProps.remove(oldCID);
    }

    // check if the instance name is being used
    if (namedComponentIDs.containsKey(instanceName))
      throw new NonstandardException("Instance name : " + instanceName +
             " already in use");
   
    // check if properties is null
    if (properties == null)
      throw new NonstandardException("Properties object should not be null");

    // call the appropriate instantiation method depending on creationProto
    String creationProto = properties.getString("creationProto", "None");
    if (creationProto.equals("local"))
      cid = createInstanceInProc(instanceName, className, properties);
    else if (creationProto.equals("gram"))
      cid = createInstanceUsingGram(instanceName, className, properties);
    else if (creationProto.equals("ssh"))
      cid = createInstanceUsingSSH(instanceName, className, properties);
    else
      throw new NonstandardException("Creation protocol : " + creationProto +
             " not supported");

    // update the componentIDProps hashMap
    componentIDProps.put(cid, properties);
View Full Code Here

   *    This method is not implemented, and a NonstandardException is thrown
   */
  public void setComponentProperties(gov.cca.ComponentID cid,
             gov.cca.TypeMap map)
    throws gov.cca.CCAException {
    throw new NonstandardException("Setting component properties after " +
           "instantiation is not permitted");
  }
View Full Code Here

    throws gov.cca.CCAException {
    logger.finest("called for Component: " + toDie.getInstanceName());

    // confirm that this is an XCATComponentID
    if (!(toDie instanceof XCATComponentID))
      throw new NonstandardException("ComponentID not an instance of XCATComponentID");
    else {
      try {
  // ignore the timeout value for now
  ((XCATComponentID) toDie).destroy();

  // Q: SHOULD WE REMOVE THIS COMPONENTID FROM OUR HASHMAPS?
      } catch (soaprmi.RemoteException re) {
  throw new NonstandardException("Can't destroy component", re);
      }
    }
  }
View Full Code Here

   */
  public String[] getProvidedPortNames(gov.cca.ComponentID cid)
    throws gov.cca.CCAException {
    logger.finest("called for Component: " + cid.getInstanceName());
    if (!(cid instanceof XCATComponentID))
      throw new NonstandardException("ComponentID not an instance of XCATComponentID");
    else {
      return ((XCATComponentID) cid).getProvidedPortNames();
    }
  }
View Full Code Here

   */
  public String[] getUsedPortNames(gov.cca.ComponentID cid)
    throws gov.cca.CCAException {
    logger.finest("called for Component: " + cid.getInstanceName());
    if (!(cid instanceof XCATComponentID))
      throw new NonstandardException("ComponentID not an instance of XCATComponentID");
    else {
      return ((XCATComponentID) cid).getUsedPortNames();
    }
  }
View Full Code Here

   *  This method is currently not implemented
   */
  public gov.cca.TypeMap getPortProperties(gov.cca.ComponentID cid,
             java.lang.String portName)
    throws gov.cca.CCAException {
    throw new NonstandardException("This method currently not supported");
  }
View Full Code Here

   */
  public void setPortProperties(gov.cca.ComponentID cid,
        java.lang.String portName,
        gov.cca.TypeMap map)
    throws gov.cca.CCAException {
    throw new NonstandardException("Can't set port properties after instantiation");
  }
View Full Code Here

      );

    // make sure that the ComponentIDs are XCATComponentIDs
    if (!(user instanceof XCATComponentID) ||
  !(provider instanceof XCATComponentID))
      throw new NonstandardException("ComponentID is not an instance of XCATComponentID");

    // make sure the ports are compatible
    if (!(((XCATComponentID) provider).getProvidesPortType(providingPortName).
    equals(((XCATComponentID) user).getUsesPortType(usingPortName))))
      throw new NonstandardException("Ports are not compatible with each other");

    // increment the number of users on the provides side
    String providesPortHandle = ((XCATComponentID) provider).incrementUsers(providingPortName);

    // add the received provides port information to Uses side
View Full Code Here

   * This method is currently not implemented, and a NonstandardException is
   * thrown
   */
  public java.lang.Object getConnectionIDs(java.lang.Object componentList)
    throws gov.cca.CCAException {
    throw new NonstandardException("This method currently not supported");
  }
View Full Code Here

TOP

Related Classes of xcat.exceptions.NonstandardException

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.