Package xcat.ports

Examples of xcat.ports.UsesPortInfo


   */
  public void unregisterUsesPort(java.lang.String portName)
    throws gov.cca.CCAException {
    logger.finest("called with portName: " + portName);

    UsesPortInfo uInfo = (UsesPortInfo) usesPortMap.get(portName);
    if (uInfo != null) {
      synchronized(uInfo) {
  if (uInfo.getInUse())
    throw new UsesPortNotReleasedException("Port " + portName + " still in use");
  else {
    uInfo.unregisterPort();
    usesPortMap.remove(portName);
  }
      }
    } else
      throw new PortNotDefinedException("Port " + portName + " not defined");
View Full Code Here


      return pInfo.getProperties();
    }

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

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

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

    XCATComponentIDClientImpl user =
      new XCATComponentIDClientImpl(userComponentName,
            userComponentHandle);

    // Add a ConnectionID object if all checks are successful
    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(usingPortName);
    if (uInfo != null) {
      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,
           usingPortName,
           providesPortHandle);
  uInfo.setConnectionID(connectionID);
      }
    } else
      throw new PortNotDefinedException("Uses Port : " + usingPortName +
          " not defined");
  }
View Full Code Here

   */
  public void disconnectProvider(String usingPortName)
    throws gov.cca.CCAException {
    logger.finest("called with uses port: " + usingPortName);

    UsesPortInfo uInfo =
      (UsesPortInfo) usesPortMap.get(usingPortName);
    if (uInfo != null) {
      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 +
          " not defined");
  }
View Full Code Here

TOP

Related Classes of xcat.ports.UsesPortInfo

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.