예제 #1
0
  /**
   * This utility method is used to get the String representation of this object of <code>InPort
   * </code>
   *
   * @return The String representation of this object.
   * @since Tifosi2.0
   */
  public String toString() {
    String baseString = super.toString();
    StringBuffer strBuf = new StringBuffer();

    strBuf.append(baseString);
    strBuf.append("");
    strBuf.append("sps inport Details ");
    strBuf.append("[");
    strBuf.append("is sync request type = ");
    strBuf.append(m_bIsSyncRequestType);
    strBuf.append(", ");
    strBuf.append("Description = ");
    strBuf.append(m_strDscription);
    strBuf.append(", ");
    strBuf.append("Java Class = ");
    strBuf.append(m_strJavaClass);
    strBuf.append(", ");
    strBuf.append("Port name = ");
    strBuf.append(m_strPortName);
    strBuf.append(", ");
    strBuf.append("XSD = ");
    strBuf.append(m_strXSD);
    strBuf.append(", ");
    if (m_params != null) {
      strBuf.append("Aliases = ");
      for (int i = 0; i < m_params.size(); i++) {
        strBuf.append((i + 1) + ". ");
        strBuf.append(((Param) m_params.elementAt(i)).toString());
        strBuf.append(", ");
      }
    }
    strBuf.append("]");
    return strBuf.toString();
  }
예제 #2
0
  /**
   * This method is called to write this object of <code>InPort</code> to the specified output
   * stream object.
   *
   * @param out DataOutput object
   * @param versionNo Description of the Parameter
   * @exception IOException if an error occurs while converting data and writing it to a binary
   *     stream.
   * @since Tifosi2.0
   */
  public void toStream(DataOutput out, int versionNo) throws IOException {
    super.toStream(out, versionNo);

    writeUTF(out, m_strPortName);
    writeUTF(out, m_strDscription);
    writeUTF(out, m_strXSD);
    writeUTF(out, m_strJavaClass);
    out.writeBoolean(m_bIsSyncRequestType);

    if (m_params != null && m_params.size() > 0) {
      int num = m_params.size();

      out.writeInt(num);
      for (int i = 0; i < num; ++i) {
        Param param = (Param) m_params.elementAt(i);

        param.toStream(out, versionNo);
      }
    } else {
      out.writeInt(0);
    }
  }