Package xcat.exceptions

Examples of xcat.exceptions.NonstandardException


      synchronized(wsInfo) {
  if (wsInfo.isUnregistered())
    throw new PortNotDefinedException("WS port: " + wsPortName +
              " has been unregistered");
  if (wsInfo.getInUse())
    throw new NonstandardException("WS Port : " + wsPortName +
           " still in use");
  wsInfo.disconnectPort();
      }
    } else
      throw new PortNotDefinedException("WS Port : " + wsPortName +
View Full Code Here


  public static void bind(String serviceHandle,
        XCATPort serviceImpl)
    throws gov.cca.CCAException {
    logger.finest("called with handle: " + serviceHandle);
    if (serviceMap.containsKey(serviceHandle))
      throw new NonstandardException("Service handle : " + serviceHandle +
             " already in the registry");
    serviceMap.put(serviceHandle, serviceImpl);
  }
View Full Code Here

   */
  public static void unbind(String serviceHandle)
    throws gov.cca.CCAException {
    logger.finest("called with handle: " + serviceHandle);
    if (!serviceMap.containsKey(serviceHandle))
      throw new NonstandardException("Service handle: " + serviceHandle +
             " not in registry");
    serviceMap.remove(serviceHandle);
  }
View Full Code Here

   */
  public static XCATPort getServiceImpl(String serviceHandle)
    throws gov.cca.CCAException {
    logger.finest("called with handle: " + serviceHandle);
    if (!serviceMap.containsKey(serviceHandle))
      throw new NonstandardException("Service handle: " + serviceHandle +
             " not in registry");
    return (XCATPort) serviceMap.get(serviceHandle);
  }
View Full Code Here

    logger.info("sleeping for : " + sleepTime + " ms");
    try {
      Thread.sleep(sleepTime);
    } catch (Exception e) {
      logger.severe("error while sleeping/writing to DB", e);
      throw new NonstandardException("Error while sleeping/writing to DB", e);
    }

    // put the state into the map, indexed by the storageID
    storageMap.put(storageID, state);
View Full Code Here

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

    // make sure the state exists in this ISS
    if (!storageMap.containsKey(storageID))
      throw new NonstandardException("ISS doesn't contain state for storageID: " +
             storageID);

    // return the state
    String state = (String) storageMap.get(storageID);
    // simulate a read from a database
    // Assume 100 MB/s, 1 char = 2B
    int sleepTime = (state.length() * 2) / 100000;
    logger.info("sleeping for : " + sleepTime + " ms");
    try {
      Thread.sleep(sleepTime);
    } catch (Exception e) {
      logger.severe("error while sleeping/reading from DB", e);
      throw new NonstandardException("Error while sleeping/reading from DB", e);
    }

    return state;
  }
View Full Code Here

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

    // make sure the state exists in this ISS
    if (!storageMap.containsKey(storageID))
      throw new NonstandardException("ISS doesn't contain state for storageID: " +
             storageID);

    // delete the entry
    storageMap.remove(storageID);
  }
View Full Code Here

       "" // SOAPAction
       );
      return reference;
    } catch (Exception e) {
      logger.severe("Exception while creating remote reference", e);
      throw new NonstandardException("Exception while creating remote reference", e);
    }
  }
View Full Code Here

  public static String createGSH(String instanceName)
    throws gov.cca.CCAException {
    logger.finest("called with instanceName: " + instanceName);
    if (handleResolverURL == null) {
      logger.severe("Can't create a GSH since URL for HandleResolver is Null");
      throw new NonstandardException("Can't create a GSH since URL for HandleResolver is Null");
    }
    return handleResolverURL + "/" + instanceName + "/" + Math.abs(random.nextInt());
  }
View Full Code Here

      xmlString = SoapServices.getDefault().getStartpointXml(reference);
    } catch (Exception e) {
      // logger.severe("Can not convert XSOAP remote reference to WSDL", e);
      // throw new NonstandardException("Can not convert XSOAP remote reference to WSDL", e);
      logger.severe("Can not convert XSOAP remote reference to String", e);
      throw new NonstandardException("Can not convert XSOAP remote reference to String", e);
    }
   
    // create the XmlBean ReferenceType
    // ReferenceType wsdlReference = null;
    ReferenceType xmlReference = null;
    try {
      // wsdlReference = (ReferenceType) ReferenceType.Factory.parse(wsdlString);
      xmlReference = (ReferenceType) ReferenceType.Factory.parse(xmlString);
    } catch (Exception e) {
      // logger.severe("Can not convert stringified WSDL to XmlBean ReferenceType", e);
      // throw new NonstandardException("Can not convert stringified WSDL to XmlBean ReferenceType",
      //                                e);
      logger.severe("Can not convert stringified reference to XmlBean ReferenceType", e);
      throw new NonstandardException("Can't convert stringified reference to XmlBean ReferenceType",
             e);
    }

    // add a reference in the real Handle Resolver
    try {
      // ClientUtil.setLocator(handleResolverURL,
      //           handle,
      //           wsdlReference);
      ClientUtil.setLocator(handleResolverURL,
          handle,
          xmlReference);
    } catch (Exception e) {
      logger.severe("Can not register reference with Handle Resolver", e);
      throw new NonstandardException("Can not register reference with Handle Resolver", e);
    }
  }
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.