001/** 002 * Copyright (c) 2014-2015 Digi International Inc., 003 * All rights not expressly granted are reserved. 004 * 005 * This Source Code Form is subject to the terms of the Mozilla Public 006 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 007 * You can obtain one at http://mozilla.org/MPL/2.0/. 008 * 009 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343 010 * ======================================================================= 011 */ 012package com.digi.xbee.api.listeners; 013 014import com.digi.xbee.api.models.XBeeMessage; 015 016/** 017 * This interface defines the required methods that should be implemented to 018 * behave as a data listener and be notified when new data is received from a 019 * remote XBee device of the network. 020 */ 021public interface IDataReceiveListener { 022 023 /** 024 * Called when data is received from a remote node of the network. 025 * 026 * @param xbeeMessage An {@code XBeeMessage} object containing the data, 027 * the {@code RemoteXBeeDevice} that sent the data and 028 * a flag indicating whether the data was sent via 029 * broadcast or not. 030 * 031 * @see com.digi.xbee.api.models.XBeeMessage 032 * @see com.digi.xbee.api.RemoteXBeeDevice 033 */ 034 public void dataReceived(XBeeMessage xbeeMessage); 035}