@Override public String toString() { StringBuilder sb = new StringBuilder() .append(describeType()) .append("{"); describeTo(sb); return sb.append("}") .toString(); }
/** * Describe the message specific properties to the given {@code stringBuilder}. Subclasses should override this * method, calling the super method and appending their own properties to the end (or beginning). * <p> * As convention, String values should be enclosed in single quotes, Objects in curly brackets and numeric values * may be appended without enclosing. All properties should be preceded by a comma when appending, or finish with a * comma when prefixing values. * * @param stringBuilder the builder to append data to */ protected void describeTo(StringBuilder stringBuilder) { stringBuilder.append("payload={") .append(getPayload()) .append('}') .append(", metadata={") .append(getMetaData()) .append('}') .append(", messageIdentifier='") .append(getIdentifier()) .append('\''); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", commandName='") .append(getCommandName()) .append('\''); }
@Override public R getPayload() { if (isExceptional()) { throw new IllegalPayloadAccessException( "This result completed exceptionally, payload is not available. " + "Try calling 'exceptionResult' to see the cause of failure.", exception ); } return super.getPayload(); } }
@Override public <S> SerializedObject<S> serializeMetaData(Serializer serializer, Class<S> expectedRepresentation) { if (delegate instanceof SerializationAware) { return ((SerializationAware) delegate).serializeMetaData(serializer, expectedRepresentation); } return serializedObjectHolder().serializeMetaData(serializer, expectedRepresentation); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", timestamp='") .append(getTimestamp().toString()); }
@Override public R getPayload() { if (isExceptional()) { throw new IllegalPayloadAccessException( "This result completed exceptionally, payload is not available. " + "Try calling 'exceptionResult' to see the cause of failure.", exception ); } return super.getPayload(); } }
@Override public <S> SerializedObject<S> serializePayload(Serializer serializer, Class<S> expectedRepresentation) { if (delegate instanceof SerializationAware) { return ((SerializationAware) delegate).serializePayload(serializer, expectedRepresentation); } return serializedObjectHolder().serializePayload(serializer, expectedRepresentation); }
/** * Describe the message specific properties to the given {@code stringBuilder}. Subclasses should override this * method, calling the super method and appending their own properties to the end (or beginning). * <p> * As convention, String values should be enclosed in single quotes, Objects in curly brackets and numeric values * may be appended without enclosing. All properties should be preceded by a comma when appending, or finish with a * comma when prefixing values. * * @param stringBuilder the builder to append data to */ protected void describeTo(StringBuilder stringBuilder) { stringBuilder.append("payload={") .append(getPayload()) .append('}') .append(", metadata={") .append(getMetaData()) .append('}') .append(", messageIdentifier='") .append(getIdentifier()) .append('\''); }
@Override public String toString() { StringBuilder sb = new StringBuilder() .append(describeType()) .append("{"); describeTo(sb); return sb.append("}") .toString(); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", queryName='") .append(getQueryName()) .append('\'') .append(", expectedResponseType='") .append(getResponseType()) .append('\''); }
/** * Describe the message specific properties to the given {@code stringBuilder}. Subclasses should override this * method, calling the super method and appending their own properties to the end (or beginning). * <p> * As convention, String values should be enclosed in single quotes, Objects in curly brackets and numeric values * may be appended without enclosing. All properties should be preceded by a comma when appending, or finish with a * comma when prefixing values. * * @param stringBuilder the builder to append data to */ protected void describeTo(StringBuilder stringBuilder) { stringBuilder.append("payload={") .append(getPayload()) .append('}') .append(", metadata={") .append(getMetaData()) .append('}') .append(", messageIdentifier='") .append(getIdentifier()) .append('\''); }
@Override public String toString() { StringBuilder sb = new StringBuilder() .append(describeType()) .append("{"); describeTo(sb); return sb.append("}") .toString(); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", timestamp='") .append(getTimestamp().toString()); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", commandName='") .append(getCommandName()) .append('\''); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", timestamp='") .append(getTimestamp().toString()); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", commandName='") .append(getCommandName()) .append('\''); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", queryName='") .append(getQueryName()) .append('\'') .append(", expectedResponseType='") .append(getResponseType()) .append('\''); }
@Override protected void describeTo(StringBuilder stringBuilder) { super.describeTo(stringBuilder); stringBuilder.append(", queryName='") .append(getQueryName()) .append('\'') .append(", expectedResponseType='") .append(getResponseType()) .append('\''); }