org.gcube.common.core.monitoring
Class GCUBEMessage

java.lang.Object
  extended by org.gcube.common.core.monitoring.GCUBEMessage
All Implemented Interfaces:
Serializable

public abstract class GCUBEMessage
extends Object
implements Serializable

This class models a base GCUBEMessage

Author:
Andrea Manzi (CERN)
See Also:
Serialized Form

Nested Class Summary
static class GCUBEMessage.ResultType
          Result types
 
Field Summary
static String DATE_FORMAT_NOW
           
protected  GCUBEMessage.ResultType result
          Result of the Monitoring message
protected  String scope
           
protected  String sourceGHN
           
protected  String time
           
protected  String topic
           
 
Constructor Summary
GCUBEMessage()
          Constructor
 
Method Summary
 GCUBEMessage.ResultType getResult()
          get the Result of the Monitoring message
 String getScope()
          Get the message scope
 String getSourceGHN()
          Get the GHN name source of the message
 String getTime()
          Get the time the message has been created
 String getTopic()
          Get the message topic name
 void setResult(GCUBEMessage.ResultType result)
          Set the result of the monitoring message
 void setScope(String scope)
          Set the message scope
 void setSourceGHN(String sourceGHN)
          Set the GHNName source of the message
 void setTime(String time)
          Set the message creation time
 void setTimeNow()
          Set message creation time to the current time
 void setTopic(String topic)
          Set the message topic name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_FORMAT_NOW

public static final String DATE_FORMAT_NOW
See Also:
Constant Field Values

topic

protected String topic

sourceGHN

protected String sourceGHN

time

protected String time

scope

protected String scope

result

protected GCUBEMessage.ResultType result
Result of the Monitoring message

Constructor Detail

GCUBEMessage

public GCUBEMessage()
Constructor

Method Detail

getTime

public String getTime()
Get the time the message has been created

Returns:
Time the message has been created

setScope

public void setScope(String scope)
Set the message scope

Parameters:
scope - the message scope to set

getScope

public String getScope()
Get the message scope

Returns:
the message scope

setTime

public void setTime(String time)
Set the message creation time

Parameters:
time - String representation of the time

getResult

public GCUBEMessage.ResultType getResult()
get the Result of the Monitoring message

Returns:
the result

setResult

public void setResult(GCUBEMessage.ResultType result)
Set the result of the monitoring message

Parameters:
result - the result

getSourceGHN

public String getSourceGHN()
Get the GHN name source of the message

Returns:
the Source GHN

setSourceGHN

public void setSourceGHN(String sourceGHN)
Set the GHNName source of the message

Parameters:
sourceGHN - the source GHN

getTopic

public String getTopic()
Get the message topic name

Returns:
the message topic name

setTopic

public void setTopic(String topic)
Set the message topic name

Parameters:
topic - the topic name

setTimeNow

public void setTimeNow()
Set message creation time to the current time



Copyright © 2012. All Rights Reserved.