Examples of WSPortInfo


Examples of xcat.ports.WSPortInfo

      sInfoBuffer.append("<portName>" +
       (String) wsKeys[i] +
       "</portName>");
     
      // copy over information from WSPortInfo to WsPortRecord
      WSPortInfo wInfo = (WSPortInfo) wsPortMap.get(wsKeys[i]);
      sInfoBuffer.append("<wsPortRecord>");
      sInfoBuffer.append("<portName>" +
       wInfo.getPortName() +
       "</portName>");
      sInfoBuffer.append("<portType>" +
       wInfo.getPortType() +
       "</portType>");
      sInfoBuffer.append("<inUse>" +
       false +
       "</inUse>"); // inUse is always false before & after migration
      sInfoBuffer.append("<unregistered>" +
       wInfo.isUnregistered() +
       "</unregistered>");
      if (wInfo.isConnected())
  sInfoBuffer.append("<endPointLocation>" +
         wInfo.getEndPointLocation() +
         "</endPointLocation>");
      // copy over the TypeMap object
      sInfoBuffer.append("<properties>");
      TypeMap tMap = wInfo.getProperties();
      String[] mapKeys = tMap.getAllKeys();
      for (int j = 0; j < mapKeys.length; j++) {
  sInfoBuffer.append("<propertiesEntry>");
  sInfoBuffer.append("<key>" +
         mapKeys[j] +
View Full Code Here

Examples of xcat.ports.WSPortInfo

          Boolean.valueOf((String) nextItem.readNextChild()).booleanValue();
      }
    }
   
    // create a WSPortInfo entry
    WSPortInfo wInfo = new WSPortInfo(portName,
              portType,
              tMap);
    wInfo.setInUse(inUse);
    if (unregistered)
      wInfo.unregisterPort();
    if (endPointLocation != null)
      wInfo.setEndPointLocation(endPointLocation);

    // add this WS port to the HashMap
    wsPortMap.put(portName, wInfo);
        }
      }
View Full Code Here

Examples of xcat.ports.WSPortInfo

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

  // create a new WSPortInfo object and add it to wsPortMap
  WSPortInfo wsInfo = new WSPortInfo(portName, type, properties);
  wsPortMap.put(portName, wsInfo);
      }
    }
  }
View Full Code Here

Examples of xcat.ports.WSPortInfo

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

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

Examples of xcat.ports.WSPortInfo

    logger.finest("called with parameters: " +
      " WS port name: " + wsPortName +
      " endpoint location: " + endPointLocation);

    // Add connection information if all checks are successful
    WSPortInfo wsInfo =
      (WSPortInfo) wsPortMap.get(wsPortName);
    if (wsInfo != null) {
      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 +
          " not defined");
  }
View Full Code Here

Examples of xcat.ports.WSPortInfo

   */
  public void disconnectWS(String wsPortName)
    throws gov.cca.CCAException {
    logger.finest("called with WS port: " + wsPortName);

    WSPortInfo wsInfo =
      (WSPortInfo) wsPortMap.get(wsPortName);
    if (wsInfo != null) {
      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 +
          " not defined");
  }
View Full Code Here

Examples of xcat.ports.WSPortInfo

   */
  public Remote getRemoteRef(String portName)
    throws gov.cca.CCAException {

    // For WS ports
    WSPortInfo wsInfo =
      (WSPortInfo) wsPortMap.get(portName);
    if (wsInfo != null) {
      synchronized(wsInfo) {
  while (wsInfo.getInUse()) {
    try {
      logger.finest("wait till the port is available");
      wsInfo.wait();
    } catch (InterruptedException ie) {
      logger.severe("Exception while waiting for port to be released", ie);
    }
  }
  if (wsInfo.isUnregistered())
    throw new PortNotDefinedException("WS port: " + portName +
              " has been unregistered");
  if (!wsInfo.isConnected())
    throw new PortNotConnectedException("WS Port " + portName
                + " not connected");
  wsInfo.setInUse(true);
  return wsInfo.getRemoteReference();
      }
    }
 
    // if it is not a WS port, check if it is a regular CCA port
    return getPort(portName);
View Full Code Here

Examples of xcat.ports.WSPortInfo

   */
  public void releaseRemoteRef(String portName)
    throws gov.cca.CCAException {

    // For WS ports
    WSPortInfo wsInfo =
      (WSPortInfo) wsPortMap.get(portName);
    if (wsInfo != null) {
      synchronized(wsInfo) {
  if (wsInfo.isUnregistered())
    throw new PortNotDefinedException("WS port: " + portName +
              " has been unregistered");
  if (wsInfo.getInUse()) {
    wsInfo.setInUse(false);
    logger.finest("wake up sleeper waiting for port to be released");
    wsInfo.notify();
    return;
  }
  else
    throw new PortNotInUseException("WS Port " + portName + " not in use");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.