/*
 * Copyright (C) 2001, C. Ramakrishnan / Illposed Software.
 * All rights reserved.
 *
 * This code is licensed under the BSD 3-Clause license.
 * See file LICENSE (or LICENSE.html) for more information.
 */

package com.illposed.osc;

import com.illposed.osc.argument.OSCTimeStamp;

public class SimpleOSCMessageListener implements OSCMessageListener {

	private boolean messageReceived;
	private OSCTimeStamp receivedTimestamp;

	public SimpleOSCMessageListener() {

		this.messageReceived = false;
		this.receivedTimestamp = null;
	}

	public OSCTimeStamp getReceivedTimestamp() {
		return receivedTimestamp;
	}

	public boolean isMessageReceived() {
		return messageReceived;
	}

	@Override
	public void acceptMessage(final OSCTimeStamp time, final OSCMessage message) {
		messageReceived = true;
		receivedTimestamp = time;
	}
}

@@ -425,16 +425,45 @@
 mestamp;
+%0A%09private OSCMessage message;
 %0A%0A%09publi
@@ -559,16 +559,39 @@
 = null;%0A
+%09%09this.message = null;%0A
 %09%7D%0A%0A%09pub
@@ -732,16 +732,72 @@
 ed;%0A%09%7D%0A%0A
+%09public OSCMessage getMessage() %7B%0A%09%09return message;%0A%09%7D%0A%0A
 %09@Overri
@@ -905,16 +905,16 @@
 = true;%0A
-
 %09%09receiv
@@ -933,13 +933,39 @@
 = time;%0A
+%09%09this.message = message;%0A
 %09%7D%0A%7D%0A

allow to fetch received message [test]