Andrew Brown | ec84305 | 2016-09-02 21:26:06 -0700 | [diff] [blame] | 1 | /*
|
| 2 | * jndn-utils
|
| 3 | * Copyright (c) 2016, Intel Corporation.
|
| 4 | *
|
| 5 | * This program is free software; you can redistribute it and/or modify it
|
| 6 | * under the terms and conditions of the GNU Lesser General Public License,
|
| 7 | * version 3, as published by the Free Software Foundation.
|
| 8 | *
|
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT ANY
|
| 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
| 11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
| 12 | * more details.
|
| 13 | */
|
| 14 |
|
| 15 | package com.intel.jndn.utils;
|
| 16 |
|
Andrew Brown | 6e00295 | 2016-09-12 20:36:45 -0700 | [diff] [blame] | 17 | import java.io.IOException;
|
| 18 | import java.util.Set;
|
Andrew Brown | ec84305 | 2016-09-02 21:26:06 -0700 | [diff] [blame] | 19 |
|
| 20 | /**
|
| 21 | * @author Andrew Brown, andrew.brown@intel.com
|
| 22 | */
|
Andrew Brown | 770e00c | 2016-09-07 15:10:00 -0700 | [diff] [blame] | 23 | public interface Subscriber extends AutoCloseable {
|
| 24 | /**
|
Andrew Brown | 6e00295 | 2016-09-12 20:36:45 -0700 | [diff] [blame] | 25 | * @return the currently known publishers
|
Andrew Brown | 770e00c | 2016-09-07 15:10:00 -0700 | [diff] [blame] | 26 | */
|
Andrew Brown | 6e00295 | 2016-09-12 20:36:45 -0700 | [diff] [blame] | 27 | Set<Long> knownPublishers();
|
| 28 |
|
| 29 | /**
|
| 30 | * Open the subscriber transport mechanisms and retrieve publisher messages
|
| 31 | *
|
| 32 | * @throws IOException if the subscriber fails during network access
|
| 33 | */
|
| 34 | void open() throws IOException;
|
Andrew Brown | ec84305 | 2016-09-02 21:26:06 -0700 | [diff] [blame] | 35 | }
|