org.ow2.jasmine.event.messages.JasmineEvent Maven / Gradle / Ivy
/**
* JASMINe
* Copyright (C) 2007 Bull S.A.S.
* Contact: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* --------------------------------------------------------------------------
* $Id: JasmineEvent.java 1942 2008-07-30 13:31:52Z loris $
* --------------------------------------------------------------------------
*/
package org.ow2.jasmine.event.messages;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
/**
* A JASMINe event.
*/
public class JasmineEvent implements Serializable {
/**
* Auto-generated serial version ID.
*/
private static final long serialVersionUID = -3140370545357738491L;
/**
* Domain of the probed server.
*/
private String domain;
/**
* Name of the probed server.
*/
private String server;
/**
* List of events for that server.
*/
private List events = new LinkedList();
/**
* @return Domain of the probed server.
*/
public String getDomain() {
return domain;
}
/**
* @param domain Domain of the probed server.
*/
public void setDomain(final String domain) {
this.domain = domain;
}
/**
* @return Name of the probed server.
*/
public String getServer() {
return server;
}
/**
* @param server Name of the probed server.
*/
public void setServer(final String server) {
this.server = server;
}
/**
* @return List of events for that server.
*/
public List getEvents() {
return events;
}
/**
* Creates a new JasmineEventDetails and adds it to the events list.
*
* @see JasmineEvent#getEvents()
*
* @param source Event source (for example, MBeanCmd or JMX).
* @param probe Probe type.
* @param value Probed value.
* @param timestamp Probe time (precise up to a second).
* @param sname JMX url of the probe.
*/
public void addEvent(final String source, final String probe, final String value, final Date timestamp, final String sname) {
this.events.add(new JasmineEventDetails(source, probe, value, timestamp, sname));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy