Package xcat.exceptions

Examples of xcat.exceptions.NonstandardException


      xmlBuffer.append("</componentState>");
      logger.finest("Size of checkpoint: " + xmlBuffer.length());
      return xmlBuffer.toString();
    } catch (Exception e) {
      logger.severe("Exception caught while storing state", e);
      throw new NonstandardException("Exception caught while storing state", e);
    }
  }
View Full Code Here


    }
  }
      }
    } catch (Exception e) {
      logger.severe("Exception caught while setting component state", e);
      throw new NonstandardException("Exception while setting component state", e);
    }
  }
View Full Code Here

  throw new PortAlreadyDefinedException("Port " + portName +
                " already defined");
      else {
  // check if the portClass property is present
  if (properties == null)
    throw new NonstandardException("TypeMap should not be empty: " +
           "need property portClass");
  String intfClassName = properties.getString("portClass",
                "None");
  if (intfClassName.equals("None"))
    throw new NonstandardException("TypeMap should contain property " +
           "portClass");

  // add a couple of standard properties
  properties.putString("cca.portName", portName);
  properties.putString("cca.portType", type);
View Full Code Here

  throw new PortAlreadyDefinedException("Port " + portName +
                " already defined");
      else {
  // check if the TypeMap is null
  if (properties == null)
    throw new NonstandardException("TypeMap should not be empty: " +
           "need property portClass");

  // add two special properties to typeMap
  properties.putString("cca.portName", portName);
  properties.putString("cca.portType", type);
 
  // add the classname of the port implementation as a property
  properties.putString("cca.portImpl", inPort.getClass().getName());

  // extract the class for the interface describing the port
  String intfClassName = properties.getString("portClass",
                "None");
  if (intfClassName.equals("None"))
    throw new NonstandardException("TypeMap should contain property " +
           "portClass");

  // export the provides port as a Grid service
  try {
    UnicastRemoteObject.exportObject(inPort,
             new Class[]{Class.forName(intfClassName)});
  } catch (Exception e) {
    logger.severe("Can't export the port as a Grid service", e);
    throw new NonstandardException("Can't export the port as a Grid service", e);
  }
 
  // create an entry for this port in the providesPortMap
  if (!(inPort instanceof XCATPort))
    throw new NonstandardException("Port to be added not an instance of XCATPort");

  // Set the GSH for the provides port
  String providesPortHandle = HandleResolver.createGSH(portName);
  ((XCATPort) inPort).setGSH(providesPortHandle);
View Full Code Here

    ProvidesPortInfo pInfo = (ProvidesPortInfo) providesPortMap.get(portName);
    if (pInfo != null) {
      synchronized(pInfo) {
  if (pInfo.getInUse())
    // Can't remove if port is still in use
    throw new NonstandardException("ProvidesPort " + portName + " still in use");
  else if (pInfo.getNumConnections() != 0)
    // Can't remove if port is still connected remotely
    throw new NonstandardException("ProvidesPort " + portName + " still connected");
  else {
    pInfo.removePort();
    // NOTE: SHOULD I SHUTDOWN THE XSOAP SERVICE HERE?
    providesPortMap.remove(portName);
  }
View Full Code Here

      synchronized(uInfo) {
  if (uInfo.isUnregistered())
    throw new PortNotDefinedException("Uses port: " + usingPortName +
              " has been unregistered");
  if (uInfo.getConnectionID() != null)
    throw new NonstandardException("Uses Port : " + usingPortName +
           " is already connected");
  XCATConnectionID connectionID =
    new XCATConnectionIDImpl(provider,
           user,
           providingPortName,
View Full Code Here

      synchronized(uInfo) {
  if (uInfo.isUnregistered())
    throw new PortNotDefinedException("Uses port: " + usingPortName +
              " has been unregistered");
  if (uInfo.getInUse())
    throw new NonstandardException("Uses Port : " + usingPortName +
           " still in use");
  uInfo.setConnectionID(null);
      }
    } else
      throw new PortNotDefinedException("Uses Port : " + usingPortName +
View Full Code Here

  public XCATConnectionInfo getConnectionInfo(String usingPortName)
    throws gov.cca.CCAException {
    logger.finest("called with uses port: " + usingPortName);
   
    if (!usesPortMap.containsKey(usingPortName))
      throw new NonstandardException("Uses Port: " + usingPortName +
             " not defined");
    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(usingPortName);
    if (uInfo.getConnectionID() == null)
      return null;
View Full Code Here

  throw new PortAlreadyDefinedException("Port " + portName +
                " already defined");
      else {
  // check if the portClass property is present
  if (properties == null)
    throw new NonstandardException("TypeMap should not be empty: " +
           "need property portClass");
  String intfClassName = properties.getString("portClass",
                "None");
  if (intfClassName.equals("None"))
    throw new NonstandardException("TypeMap should contain property " +
           "portClass");

  // add a couple of standard properties
  properties.putString("cca.portName", portName);
  properties.putString("cca.portType", type);
View Full Code Here

      synchronized(wsInfo) {
  if (wsInfo.isUnregistered())
    throw new PortNotDefinedException("WS port: " + wsPortName +
              " has been unregistered");
  if (wsInfo.isConnected())
    throw new NonstandardException("WS Port : " + wsPortName +
           " is already connected");
  wsInfo.setEndPointLocation(endPointLocation);
      }
    } else
      throw new PortNotDefinedException("WS Port : " + wsPortName +
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.