Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * PubSub.java
- * Author: rfronteddu@ihmc.us
- * This file is part of the IHMC NetSensor Library/Component
- * Copyright (c) 2010-2018 IHMC.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 3 (GPLv3) as published by the Free Software Foundation.
- *
- * U.S. Government agencies and organizations may redistribute
- * and/or modify this program under terms equivalent to
- * "Government Purpose Rights" as defined by DFARS
- * 252.227-7014(a)(12) (February 2014).
- *
- * Alternative licenses that allow for use within commercial products may be
- * available. Contact Niranjan Suri at IHMC (nsuri@ihmc.us) for details.
- *
- *
- */
- package us.ihmc.anglova.protocols;
- import java.util.List;
- public interface PubSub
- {
- /**
- * @param brokerList list of brokers in the form addr:port
- * @return true if successful
- */
- boolean connect (List<String> brokerList);
- /**
- * Disconnect from all the brokers
- * @return true if successful
- */
- boolean disconnect();
- /**
- * Publish msg to all the brokers
- * @param msg
- * @return
- */
- boolean publish (byte[] msg);
- /**
- * Register the callback to be called when a message is received for the Topic topic
- * @param topic topic to register to
- * @param callback callback to call when a msg is received for the topic topic
- * @return
- */
- boolean subscribe (String topic, SubscribeCallback callback);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement