class TOMMessage extends SystemMessage implements Externalizable, Comparable, Cloneable {

	@Override
	public int compareTo(Object o) {
		final int BEFORE = -1;
		final int EQUAL = 0;
		final int AFTER = 1;

		TOMMessage tm = (TOMMessage) o;

		if (this.equals(tm))
			return EQUAL;

		if (this.getSender() < tm.getSender())
			return BEFORE;
		if (this.getSender() > tm.getSender())
			return AFTER;

		if (this.getSession() < tm.getSession())
			return BEFORE;
		if (this.getSession() > tm.getSession())
			return AFTER;

		if (this.getSequence() < tm.getSequence())
			return BEFORE;
		if (this.getSequence() > tm.getSequence())
			return AFTER;

		if (this.getOperationId() < tm.getOperationId())
			return BEFORE;
		if (this.getOperationId() > tm.getOperationId())
			return AFTER;

		return EQUAL;
	}

	public  TOMMessage();
	public  TOMMessage(int sender, int session, int sequence, byte[] content, int view, TOMMessageType type);
	public  TOMMessage(int sender, int session, int sequence, int operationId, byte[] content, int view,
			TOMMessageType type);

}