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

nyla.solutions.global.data.Envelope Maven / Gradle / Ivy

Go to download

Nyla Solutions Global Java API provides support for basic application utilities (application configuration, data encryption, debugger and text processing).

The newest version!
package nyla.solutions.global.data;

import java.io.Serializable;
import java.util.Map;

/**
 * This object encapsulates a request and response.
 * @author Gregory Green
 *
 */
public class Envelope implements Serializable
{
	/**
	 * Default constructor
	 */
	public Envelope()
	{}
	// --------------------------------------------------------
	/**
	 * Default constructor
	 */
	public Envelope(PayloadType payload)
	{
		this.payload = payload;
	}
	// --------------------------------------------------------�
	/**
	 * Create with header and payload
	 * @param header the envelope header
	 * @param payload the payload
	 */
	public Envelope(Map header, PayloadType payload)
	{
		this.header = header;
		this.payload = payload;
	}// --------------------------------------------------------



	/**
	 * 
	 */
	private static final long serialVersionUID = 543197843593634035L;
	/**
	 * @return the header
	 */
	public final Map getHeader()
	{
		return header;
	}// --------------------------------------------
	/**
	 * @param header the header to set
	 */
	public final void setHeader(Map header)
	{
		this.header = header;
	}// --------------------------------------------
	
	/**
	 * @return the pay load
	 */
	public final  PayloadType getPayload()
	{
		return payload;
	}
	/**
	 * @param payload the pay load to set
	 */
	public final void setPayload(PayloadType payload)
	{
		this.payload = payload;
	}// ------------------------------------------------'	
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString()
	{
		return "Envelope [header=" + header + ", payload=" + payload + "]";
	}



	private Map header = null;
	private PayloadType payload  = null;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy