Package com.sos.JSHelper.Exceptions

Examples of com.sos.JSHelper.Exceptions.JobSchedulerException


      objC = u.unmarshal(new StringReader(pstrXMLContent));
    }
    catch (JAXBException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    return objC;
  } // private Object unMarshall
View Full Code Here


      // objM.marshal(objO, objF);
    }
    catch (JAXBException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    return objO;
  } // private SchedulerObjectFactoryOptions marshal
View Full Code Here

//      objM.marshal(objO, objF);
    }
    catch (JAXBException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("",e);
    }
    catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("",e);
    }
    catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new JobSchedulerException("",e);
    }
    return baos.toString();
  } // private SchedulerObjectFactoryOptions marshal
View Full Code Here

    if (pobjVirtualFile != null) {
      OutputStream objOutputStream = pobjVirtualFile.getFileOutputStream();
      try {
        if (objOutputStream == null) {
          logger.error(String.format("can't get outputstream for file '%1$s'.", pobjVirtualFile.getName()));
          throw new JobSchedulerException(String.format("can't get outputstream for file '%1$s'.", pobjVirtualFile.getName()));
        }
        // get an Apache XMLSerializer configured to generate CDATA
        XMLSerializer serializer = getXMLSerializer();
        serializer.setOutputByteStream(objOutputStream);
        // marshal using the Apache XMLSerializer
        objM.marshal(objO, serializer.asContentHandler());
      }
      catch (JAXBException e) {
        e.printStackTrace();
        throw new JobSchedulerException("", e);
      }
      catch (IOException e) {
        e.printStackTrace();
        throw new JobSchedulerException("", e);
      }
      finally {
        pobjVirtualFile.closeOutput();
      }
    }
    else {
      logger.error("pobjVirtualFile is null");
      throw new JobSchedulerException("pobjVirtualFile is null");
    }
    return objO;
  } // private SchedulerObjectFactoryOptions marshal
View Full Code Here

      // objM.marshal(objO, objSW);
      strT = objSW.getBuffer().toString();
    }
    catch (JAXBException e) {
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    catch (IOException e) {
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    catch (Exception e) {
      e.printStackTrace();
      throw new JobSchedulerException("", e);
    }
    return strT;
  } // private SchedulerObjectFactoryOptions marshal
View Full Code Here

        objSchedulerSocket = new SchedulerSocket(objOptions);
      }
      catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        throw new JobSchedulerException(e.getMessage(), e);
      }
    }
    return objSchedulerSocket;
  } // private SchedulerSocket getSocket
View Full Code Here

    try {
      super.Value(pstrValue);
      parseValue2Vector();
    }
    catch (Exception e) {
      throw new JobSchedulerException("Illegal/Invalid value '" + pstrValue + "' for Option " + this.Description() + ", " + this.strKey, e);
    }
  }
View Full Code Here

          if (element.indexOf("-") == -1) {
            try {
              result.add(new Integer(element));
            }
            catch (Exception e) {
              throw new JobSchedulerException("Illegal numeric value : " + element, e);
            }
          }
          else {
            String[] range = element.split("-");
            int from = 0;
            int to = 0;
            try {
              from = Integer.parseInt(range[0].trim());
              to = Integer.parseInt(range[1].trim());
            }
            catch (Exception e) {
              throw new JobSchedulerException("Illegal numeric value : " + element, e);
            }
            int stepSize = 1;
            for (int j = from; j <= to; j = j + stepSize)
              result.add(new Integer(j));
          }
View Full Code Here

    public boolean hasScript() {
        @SuppressWarnings("unused")
        final String conMethodName = conClassName + "::hasScript";
        final Script objScript = getScript();
        if (objScript == null) {
            final JobSchedulerException objJSException = new JobSchedulerException("Job has no script.");
            logger.error("", objJSException);
            throw objJSException;
        }
        //TODO else if (objScript.getLanguage()... ) {
        // }
View Full Code Here

      int portNum = Integer.parseInt(pstrPortNumber);
      if (portNum >= 0 && portNum < 65535) {
        super.Value(pstrPortNumber);
      }
      else {
        throw new JobSchedulerException(String.format("invalid port number: %1$s", pstrPortNumber));
      }
    }
    catch (Exception e) {
      throw new JobSchedulerException(String.format("invalid port number: %1$s", pstrPortNumber));
    }
  } // private void Value
View Full Code Here

TOP

Related Classes of com.sos.JSHelper.Exceptions.JobSchedulerException

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.