All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.limemojito.aws.sqs.pump.SqsPumpMessage Maven / Gradle / Ivy

There is a newer version: 14.3.1
Show newest version
/*
 * Copyright 2011-2024 Lime Mojito Pty Ltd
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 *
 */

package com.limemojito.aws.sqs.pump;

import lombok.Value;

import java.util.Map;

/**
 * The {@code SqsPumpMessage} class represents a message received from an Amazon Simple Queue Service (SQS) queue.
 * Each instance of this class contains the actual message payload and optional attributes associated with the message.
 *
 * 

* This class is immutable and follows the value object pattern. Once created, the values of the {@code SqsPumpMessage} * instance cannot be modified. *

* *

* The message payload is stored in the {@code message} field, which can hold any Java object. The optional attributes * associated with the message are stored in the {@code attributes} field, which is a map of string keys to arbitrary * object values. *

* * *

Usage:

* *
 * SqsPumpMessage message = new SqsPumpMessage(payload, attributes);
 * 
* *

Serialization:

* *

* This class is annotated with Lombok's {@code @Value} annotation, and therefore provides both {@code equals()}, * {@code hashCode()}, and {@code toString()} methods based on the values of its fields. *

* *

* To serialize/deserialize instances of this class, a framework such as JSON or XML serialization can be used. *

*/ @Value @SuppressWarnings("RedundantModifiersValueLombok") public class SqsPumpMessage { private Object message; private Map attributes; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy