Package org.springframework.messaging

Examples of org.springframework.messaging.MessageHandlingException


        NativeMessageHeaderAccessor.NATIVE_HEADERS);
  }

  @Override
  protected void handleMissingValue(String headerName, MethodParameter parameter, Message<?> message) {
    throw new MessageHandlingException(message, "Missing header '" + headerName +
        "' for method parameter type [" + parameter.getParameterType() + "]");
  }
View Full Code Here


    return (vars != null) ? vars.get(name) : null;
  }

  @Override
  protected void handleMissingValue(String name, MethodParameter parameter, Message<?> message) {
    throw new MessageHandlingException(message, "Missing path template variable '" + name +
        "' for method parameter type [" + parameter.getParameterType() + "]");
  }
View Full Code Here

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

  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

    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

  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

    final JobExecution jobExecution;

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

    return jobExecution;

  }
View Full Code Here

    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

Related Classes of org.springframework.messaging.MessageHandlingException

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.