Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2004-2008 the original author oimport java.io.Serializable;
 
 import org.springframework.core.style.ToStringCreator;
 ou 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 org.springframework.binding.message;
An object of communication that provides text information from a source. For example, a validation message may inform a web application user a business rule was violated. A messages comes from a source, has text providing the basis for communication, and has severity indicating the priority or intensity of the message for its receiver.

Author(s):
Keith Donald
public class Message implements Serializable {
	private Object source;
	private String text;
	private Severity severity;

Creates a new message.

Parameters:
source the source of the message
text the message text
severity the message severity
	public Message(Object sourceString textSeverity severity) {
		this. = source;
		this. = text;
		this. = severity;
	}

Returns the source of this message. The source is the object that sent the message.

Returns:
the source
	public Object getSource() {
		return ;
	}

Returns the message text. The text is the message's communication payload.

Returns:
the message text
	public String getText() {
		return ;
	}

Returns the severity of this message. The severity indicates the intensity or priority of the communication.

Returns:
the message severity
	public Severity getSeverity() {
		return ;
	}
	public String toString() {
		return new ToStringCreator(this).append("severity").append("text").toString();
	}
New to GrepCode? Check out our FAQ X