Package xcat.exceptions

Examples of xcat.exceptions.PortNotDefinedException


    } catch (InterruptedException ie) {
      logger.severe("Exception while waiting for port to be released", ie);
    }
  }
  if (pInfo.isRemoved())
    throw new PortNotDefinedException("Provides port : " + portName +
              " has been removed");
  pInfo.setInUse(true);
  return pInfo.getProvidesPortReference();
      }
    }

    // For uses ports
    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(portName);
    if (uInfo != null) {
      synchronized(uInfo) {
  while (uInfo.getInUse() || uInfo.getInMigration()) {
    try {
      logger.finest("wait till the port is available");
      uInfo.wait();
    } catch (InterruptedException ie) {
      logger.severe("Exception while waiting for port to be released", ie);
    }
  }
  if (uInfo.isUnregistered())
    throw new PortNotDefinedException("Uses port: " + portName +
              " has been unregistered");
  if (uInfo.getConnectionID() == null)
    throw new PortNotConnectedException("Port " + portName
                + " not connected");
  uInfo.setInUse(true);
  return uInfo.getProvidesPortReference();
      }
    }

    logger.severe("Port " + portName + " not defined");
    throw new PortNotDefinedException("Port " + portName + " not defined");
  }
View Full Code Here


    ProvidesPortInfo pInfo =
      (ProvidesPortInfo) providesPortMap.get(portName);
    if (pInfo != null) {
      synchronized(pInfo) {
  if (pInfo.isRemoved())
    throw new PortNotDefinedException("Provides port : " + portName +
              " has been removed");
  if (pInfo.getInUse()) {
    logger.finest("port is in use");
    return null;
  }
  else {
    pInfo.setInUse(true);
    return pInfo.getProvidesPortReference();
  }
      }
    }

    // For uses ports
    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(portName);
    if (uInfo != null) {
      synchronized(uInfo) {
  if (uInfo.isUnregistered())
    throw new PortNotDefinedException("Uses port: " + portName +
              " has been unregistered");
  if (uInfo.getInUse() || uInfo.getInMigration()) {
    logger.finest("port not available");
    return null;
  }
  else if (uInfo.getConnectionID() == null)
    throw new PortNotConnectedException("Port " + portName + " not connected");
  else {
    uInfo.setInUse(true);
    // return the reference to the provides port
    return uInfo.getProvidesPortReference();
  }
      }
    }

    logger.severe("Port " + portName + " not defined");
    throw new PortNotDefinedException("Port " + portName + " not defined");
  }
View Full Code Here

    ProvidesPortInfo pInfo =
      (ProvidesPortInfo) providesPortMap.get(portName);
    if (pInfo != null) {
      synchronized(pInfo) {
  if (pInfo.isRemoved())
    throw new PortNotDefinedException("Provides port : " + portName +
              " has been removed");
  if (pInfo.getInUse()) {
    pInfo.setInUse(false);
    logger.finest("wake up sleeper waiting for port to be released");
    pInfo.notify();
    return;
  }
  else
    throw new PortNotInUseException("Port " + portName + " not in use");
      }
    }

    // For uses ports
    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(portName);
    if (uInfo != null) {
      synchronized(uInfo) {
  if (uInfo.isUnregistered())
    throw new PortNotDefinedException("Uses port: " + portName +
              " has been unregistered");
  if (uInfo.getInUse()) {
    uInfo.setInUse(false);
    logger.finest("wake up sleeper waiting for port to be released");
    uInfo.notify();
    return;
  }
  else
    throw new PortNotInUseException("Port " + portName + " not in use");
      }
    }

    logger.severe("Port " + portName + " not defined");
    throw new PortNotDefinedException("Port " + portName + " not defined");
  }
View Full Code Here

    uInfo.unregisterPort();
    usesPortMap.remove(portName);
  }
      }
    } else
      throw new PortNotDefinedException("Port " + portName + " not defined");
  }
View Full Code Here

      UsesPortInfo uInfo = (UsesPortInfo) usesPortMap.get(name);
      return uInfo.getProperties();
    }
   
    // port not found
    throw new PortNotDefinedException("Port " + name + " not defined");
  }
View Full Code Here

    // NOTE: SHOULD I SHUTDOWN THE XSOAP SERVICE HERE?
    providesPortMap.remove(portName);
  }
      }
    } else
      throw new PortNotDefinedException("Port " + portName + " not defined");
  }
View Full Code Here

      synchronized(pInfo) {
  TypeMap pMap = pInfo.getProperties();
  return pMap.getString("cca.portType", "None");
      }
    } else
      throw new PortNotDefinedException("Port " + providesPortName + " not defined");
  }
View Full Code Here

      synchronized(uInfo) {
  TypeMap uMap = uInfo.getProperties();
  return uMap.getString("cca.portType", "None");
      }
    } else
      throw new PortNotDefinedException("Port " + usesPortName + " not defined");
  }
View Full Code Here

    ProvidesPortInfo pInfo =
      (ProvidesPortInfo) providesPortMap.get(providesPortName);
    if (pInfo != null) {
      synchronized(pInfo) {
  if (pInfo.isRemoved())
    throw new PortNotDefinedException("Provides Port : " + providesPortName +
              " has been removed");
  String retVal = pInfo.getProvidesPortHandle();
  return retVal;
      }
    } else
      throw new PortNotDefinedException("Provides Port : " + providesPortName +
          " not defined");
  }
View Full Code Here

    ProvidesPortInfo pInfo =
      (ProvidesPortInfo) providesPortMap.get(providesPortName);
    if (pInfo != null) {
      synchronized(pInfo) {
  if (pInfo.isRemoved())
    throw new PortNotDefinedException("Provides Port : " + providesPortName +
              " has been removed");
  String retVal = pInfo.getProvidesPortHandle();
  pInfo.incrNumConnections();
  return retVal;
      }
    } else
      throw new PortNotDefinedException("Provides Port : " + providesPortName +
          " not defined");
  }
View Full Code Here

TOP

Related Classes of xcat.exceptions.PortNotDefinedException

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.