Examples of MessageHandlingException


Examples of org.springframework.messaging.MessageHandlingException

  protected final void handleMessageInternal(Message<?> message) throws Exception {
    try {
      doWrite(message);
    }
    catch (Exception e) {
      throw new MessageHandlingException(message,
          "failed to write Message payload to HDFS", e);
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageHandlingException

    Object payload = message.getPayload();
    if (payload instanceof String) {
      storeWriter.write((String) payload);
    }
    else {
      throw new MessageHandlingException(message,
          "message not a String");
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageHandlingException

  protected void doWrite(Message<?> message) {
    try {
      hdfsWriter.write(message);
    }
    catch (Exception e) {
      throw new MessageHandlingException(message,
          "failed to write Message payload to HDFS", e);
    }
  }
View Full Code Here

Examples of org.springframework.messaging.MessageHandlingException

    final JobExecution jobExecution;

    try {
      jobExecution = this.jobLaunchingMessageHandler.launch(jobLaunchRequest);
    } catch (JobExecutionException e) {
      throw new MessageHandlingException(requestMessage, e);
    }

    return jobExecution;

  }
View Full Code Here

Examples of org.springframework.messaging.MessageHandlingException

    else if (payload instanceof String) {
      try {
        bytes = ((String) payload).getBytes(this.charset);
      }
      catch (UnsupportedEncodingException e) {
        throw new MessageHandlingException(message, e);
      }
    }
    else {
      throw new MessageHandlingException(message,
          "HdfsTextFileWriter expects " +
              "either a byte array or String payload, but received: " + payload.getClass());
    }
    return bytes;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.