| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| NetworkAdapter | 33 | 0 | - | 0 | 0 |
| 1 | /* | |
| 2 | * See the NOTICE file distributed with this work for additional | |
| 3 | * information regarding copyright ownership. | |
| 4 | * | |
| 5 | * This is free software; you can redistribute it and/or modify it | |
| 6 | * under the terms of the GNU Lesser General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2.1 of | |
| 8 | * the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This software is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this software; if not, write to the Free | |
| 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
| 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
| 19 | */ | |
| 20 | package org.xwiki.observation.remote; | |
| 21 | ||
| 22 | import org.xwiki.component.annotation.Role; | |
| 23 | ||
| 24 | /** | |
| 25 | * Handle all the actual communication with the network. | |
| 26 | * <p> | |
| 27 | * It's the entry point of the chosen implementation for the actual event distribution. | |
| 28 | * | |
| 29 | * @version $Id: 5e3ec0ad7d1fc7b896a2ed83cdad964ab1191579 $ | |
| 30 | * @since 2.0RC1 | |
| 31 | */ | |
| 32 | @Role | |
| 33 | public interface NetworkAdapter | |
| 34 | { | |
| 35 | /** | |
| 36 | * Send serializable event to the network depending of the implementation. | |
| 37 | * | |
| 38 | * @param remoteEvent the serializable event to send | |
| 39 | */ | |
| 40 | void send(RemoteEventData remoteEvent); | |
| 41 | ||
| 42 | /** | |
| 43 | * Stop a running channel. | |
| 44 | * | |
| 45 | * @param channelId the identifier of the channel to stop | |
| 46 | * @throws RemoteEventException error when trying to stop a running channel | |
| 47 | */ | |
| 48 | void stopChannel(String channelId) throws RemoteEventException; | |
| 49 | ||
| 50 | /** | |
| 51 | * Start a channel. | |
| 52 | * | |
| 53 | * @param channelId the identifier of the channel to start | |
| 54 | * @throws RemoteEventException error when trying to start a channel | |
| 55 | */ | |
| 56 | void startChannel(String channelId) throws RemoteEventException; | |
| 57 | ||
| 58 | /** | |
| 59 | * Stop all running channels. | |
| 60 | * | |
| 61 | * @throws RemoteEventException error when trying to stop a running channel | |
| 62 | * @since 2.3M1 | |
| 63 | */ | |
| 64 | void stopAllChannels() throws RemoteEventException; | |
| 65 | } |