⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datagetset.java

📁 这是一个用java和xml编写的流媒体服务器管理软件
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
  public void setSmokeAlarmData(String data) throws InvalidRequestException  {    checkValidity("setSmokeAlarmData");    setValue("smokeAlarm", data);  }  /**   *    */  public String getSmokeAlarmData() throws InvalidRequestException  {    checkValidity("getSmokeAlarmData");    return getValue("smokeAlarm");  }    /**   *    */  public void setTemperatureData(String data)     throws InvalidRequestException  {    checkValidity("setTemperatureData");    setValue("temperature", data);  }  /**   *    */  public String getTemperatureData() throws InvalidRequestException  {    checkValidity("getTemperatureData");    return getValue("temperature");  }    /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setWaterData(String data) throws InvalidRequestException  {    checkValidity("setWaterData");    setValue("water", data);  }  /**   *    */  public String getWaterData() throws InvalidRequestException  {    checkValidity("getWaterData");    return getValue("water");  }    public String getHostNameData()throws InvalidRequestException  {	  checkValidity("getHostNameData");	  return getValue("hostname");  }    public void setHostNameData(String data) throws InvalidRequestException  {	  checkValidity("setHostNameData");	  setValue("hostname", data);  }    // methods from PDPData    /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setMaxThreadsData(String data) throws InvalidRequestException  {    checkValidity("setMaxThreadsData");    setValue("maxThreads", data);  }  /**   *    */  public String getMaxThreadsData() throws InvalidRequestException  {    checkValidity("getMaxThreadsData");    return getValue("maxThreads");  }    /**   *    */  public void setKeepAliveTimerData(String data)     throws InvalidRequestException  {    checkValidity("setKeepAliveTimerData");    setValue("keepAliveTimer", data);  }  /**   *    */  public String getKeepAliveTimerData() throws InvalidRequestException  {    checkValidity("getKeepAliveTimerData");    return getValue("keepAliveTimer");  }    /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setResponseTimeData(String data) throws InvalidRequestException  {    checkValidity("setResponseTimeData");    setValue("responseTime", data);  }  /**   *    */  public String getResponseTimeData() throws InvalidRequestException  {    checkValidity("getResponseTimeData");    return getValue("responseTime");  }  // methods from OSPData  /**   *    */  public Vector getServicePointURL() throws InvalidRequestException  {    checkValidity("getSevicePointURL");    Vector vector = new Vector();    Element element = getElement("servicePoints");    NodeList servicePoints = element.getElementsByTagName("servicePoint");    for (int i = 0; i < servicePoints.getLength(); i++)    {      Element servicePoint = (Element) servicePoints.item(i);      vector.addElement(servicePoint.getAttribute("url"));    }    return vector;  }  /**   *    * @param vector   *    * @throws InvalidRequestException   */  public void setServicePointURL(Vector vector) throws InvalidRequestException  {    checkValidity("setSevicePointURL");    Element servicePoints = getElement("servicePoints");    Node parent = servicePoints.getParentNode();    Document doc = servicePoints.getOwnerDocument();    Element newServicePoints = doc.createElement("servicePoints");    for (int i = 0; i < vector.size(); i++)    {      Element newServicePoint = doc.createElement("servicePoint");      newServicePoint.setAttribute("url", (String) vector.elementAt(i));      newServicePoints.appendChild(newServicePoint);    }    parent.replaceChild(newServicePoints, servicePoints);  }  /**   *    */  public String getLocalValidation() throws InvalidRequestException  {    checkValidity("getLocalValidation");    return getValue("localValidation");  }  /**   *    */  public void setLocalValidation(String data) throws InvalidRequestException  {    checkValidity("setLocalValidation");    setValue("localValidation", data);  }  /**   *    */  public String getSslLifetime() throws InvalidRequestException  {    checkValidity("getSslLifetime");    return getValue("sslLifetime");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setSslLifetime(String data) throws InvalidRequestException  {    checkValidity("setSslLifetime");    setValue("sslLifetime", data);  }  /**   *    */  public String getHttpMaxConnections() throws InvalidRequestException  {    checkValidity("getHttpMaxConnections");    return getValue("maxConnections");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setHttpMaxConnections(String data)     throws InvalidRequestException  {    checkValidity("setHttpMaxConnections");    setValue("maxConnections", data);  }  /**   *    */  public String getHttpPersistence() throws InvalidRequestException  {    checkValidity("getHttpPersistence");    return getValue("persistence");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setHttpPersistence(String data) throws InvalidRequestException  {    checkValidity("setHttpPersistence");    setValue("persistence", data);  }  /**   *    */  public String getHttpRetryDelay() throws InvalidRequestException  {    checkValidity("getHttpRetryDelay");    return getValue("retryDelay");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setHttpRetryDelay(String data) throws InvalidRequestException  {    checkValidity("setHttpRetryDelay");    setValue("retryDelay", data);  }  /**   *    */  public String getHttpRetryLimit() throws InvalidRequestException  {    checkValidity("getHttpRetryLimit");    return getValue("retryLimit");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setHttpRetryLimit(String data) throws InvalidRequestException  {    checkValidity("setHttpRetryLimit");    setValue("retryLimit", data);  }  /**   *    */  public String getHttpTimeout() throws InvalidRequestException  {    checkValidity("getHttpTimeout");    return getValue("timeout");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setHttpTimeout(String data) throws InvalidRequestException  {    checkValidity("setHttpTimeout");    setValue("timeout", data);  }  /**   *    */  public String getOspExtension() throws InvalidRequestException  {    checkValidity("getOspExtension");    return getValue("ospExtension");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setOspExtension(String data) throws InvalidRequestException  {    checkValidity("setOspExtension");    setValue("ospExtension", data);  }  /**   *    */  public String getCustomerID() throws InvalidRequestException  {    checkValidity("getCustomerID");    return getValue("customerID");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setCustomerID(String data) throws InvalidRequestException  {    checkValidity("setCustomerID");    setValue("customerID", data);  }  /**   *    */  public String getDeviceID() throws InvalidRequestException  {    checkValidity("getDeviceID");    return getValue("deviceID");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setDeviceID(String data) throws InvalidRequestException  {    checkValidity("setDeviceID");    setValue("deviceID", data);  }  /**   *    */  public String getAuditURL() throws InvalidRequestException  {    checkValidity("getAuditURL");    return getValue("auditURL");  }  /**   *    * @param data   *    * @throws InvalidRequestException   */  public void setAuditURL(String data) throws InvalidRequestException  {    checkValidity("setAuditURL");    setValue("auditURL", data);  }  /*Accredit previewdata*/  public boolean getIsPreviewData(int i) throws InvalidRequestException    {	System.out.println("why");    checkValidity("getIsPreviewData");    String Camera="Camera"+i;    String truth = getElement(Camera).getAttribute("Preview");    if (truth.equals("true"))    {      return true;    }    return false;  }  /*   */  public void setIsPreviewData(boolean truth,int i)     throws InvalidRequestException  {    checkValidity("setCameraPreviewData");    String camera="camera"+i;    if (truth)    {      getElement(camera).setAttribute("preview", "true");    }    else    {      getElement(camera).setAttribute("preview", "false");    }  }    public boolean getIsConData(int i) throws InvalidRequestException  {    checkValidity("getIsConData");    String camera="camera"+i;    String truth = getElement(camera).getAttribute("control");    if (truth.equals("true"))    {      return true;    }    return false;  }  /**   *    * @param truth   *    * @throws InvalidRequestException   */  public void setIsConData(boolean truth,int i)     throws InvalidRequestException  {    checkValidity("setIsConData");    String camera="camera"+i;    if (truth)    {      getElement(camera).setAttribute("control", "true");    }    else    {      getElement(camera).setAttribute("control", "false");    }  }    /**   *    */  public boolean getIsPlayHistoryData(int i) throws InvalidRequestException  {    checkValidity("getIsPlayHistoryData");    String camera="camera"+i;    String truth = getElement(camera).getAttribute("history");    if (truth.equals("true"))    {      return true;    }    return false;  }  /**   *    * @param truth   *    * @throws InvalidRequestException   */  public void setIsPlayHistoryData(boolean truth,int i)     throws InvalidRequestException  {	  checkValidity("setIsPlayHistoryData");	    String camera="camera"+i;	    if (truth)	    {	      getElement(camera).setAttribute("history", "true");	    }	    else	    {	      getElement(camera).setAttribute("history", "false");	    }  }  // abstract methods  /**   *    * @param methodName   *    * @throws InvalidRequestException   */  protected abstract void checkValidity(String methodName)     throws InvalidRequestException;  /**   *    */  protected abstract void setValue(String tagName, String data);  /**   *    */  protected abstract String getValue(String tagName);  /**   *    */  protected abstract Element getElement(String tagName);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -