Package org.red5.compatibility.flex.messaging.messages

Examples of org.red5.compatibility.flex.messaging.messages.ErrorMessage


   * @param faultString fault string
   * @param faultDetail fault detail
   * @return error message
   */
  public static ErrorMessage returnError(AbstractMessage request, String faultCode, String faultString, String faultDetail) {
    ErrorMessage result = new ErrorMessage();
    result.timestamp = System.currentTimeMillis();
    result.headers = request.headers;
    result.destination = request.destination;
    result.correlationId = request.messageId;
    result.faultCode = faultCode;
View Full Code Here


   * @param faultString fautl string
   * @param error error
   * @return message
   */
  public static ErrorMessage returnError(AbstractMessage request, String faultCode, String faultString, Throwable error) {
    ErrorMessage result = returnError(request, faultCode, faultString, "");
    if (error instanceof ClientDetailsException) {
      result.extendedData = ((ClientDetailsException) error).getParameters();
      if (((ClientDetailsException) error).includeStacktrace()) {
        StringBuilder stack = new StringBuilder();
        for (StackTraceElement element : error.getStackTrace()) {
View Full Code Here

   * @param faultString
   * @param faultDetail
   * @return
   */
  public static ErrorMessage returnError(AbstractMessage request, String faultCode, String faultString, String faultDetail) {
    ErrorMessage result = new ErrorMessage();
    result.timestamp = System.currentTimeMillis();
    result.headers = request.headers;
    result.destination = request.destination;
    result.correlationId = request.messageId;
    result.faultCode = faultCode;
View Full Code Here

   * @param faultString
   * @param error
   * @return
   */
  public static ErrorMessage returnError(AbstractMessage request, String faultCode, String faultString, Throwable error) {
    ErrorMessage result = returnError(request, faultCode, faultString, "");
    if (error instanceof ClientDetailsException) {
      result.extendedData = ((ClientDetailsException) error).getParameters();
      if (((ClientDetailsException) error).includeStacktrace()) {
        StringBuilder stack = new StringBuilder();
        for (StackTraceElement element: error.getStackTrace()) {
View Full Code Here

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

  }
View Full Code Here

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

     */

    private void init() throws IOException {

   
    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils

        .getScopeService(scope, IStreamableFileFactory.class,

            StreamableFileFactory.class);

    File folder = file.getParentFile();

    if (!folder.exists()) {

      if (!folder.mkdirs()) {

        throw new IOException("Could not create parent folder");

      }

    }

    if (!file.isFile()) {

      // Maybe the (previously existing) file has been deleted

      file.createNewFile();

    } else if (!file.canWrite()) {

      throw new IOException("The file is read-only");

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

View Full Code Here

     *
     * @throws IOException          I/O exception
     */
    protected void init() throws IOException {

    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils
        .getScopeService(this.scope, IStreamableFileFactory.class,
            StreamableFileFactory.class);
   
    File folder = file.getParentFile();

    if (!folder.exists()) {
      if (!folder.mkdirs()) {
        throw new IOException("Could not create parent folder");
      }
    }

    if (!this.file.isFile()) {

      // Maybe the (previously existing) file has been deleted
      this.file.createNewFile();

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

      throw new IOException("The file is read-only");

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

  }
View Full Code Here

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

TOP

Related Classes of org.red5.compatibility.flex.messaging.messages.ErrorMessage

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.