Пример #1
0
 /**
  * Get timeout
  *
  * @return timeout or -1 if not available
  */
 public int getTimeout() {
   String timeoutStr = _record.getSimpleField(Attributes.TIMEOUT.name());
   int timeout = -1;
   if (timeoutStr != null) {
     try {
       timeout = Integer.parseInt(timeoutStr);
     } catch (Exception e) {
       // ignore
     }
   }
   return timeout;
 }
Пример #2
0
 /**
  * Set the time to wait before stopping execution of this message
  *
  * @param timeout the timeout in ms, or -1 indicating no timeout
  */
 public void setExecutionTimeout(int timeout) {
   _record.setIntField(Attributes.TIMEOUT.toString(), timeout);
 }
Пример #3
0
 /**
  * Get the time to wait before stopping execution of this message
  *
  * @return the timeout in ms, or -1 indicating no timeout
  */
 public int getExecutionTimeout() {
   return _record.getIntField(Attributes.TIMEOUT.toString(), -1);
 }