1 /*
2 * Copyright (c) 2006 Stiftung Deutsches Elektronen-Synchroton,
3 * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY.
4 *
5 * THIS SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS" BASIS.
6 * WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
7 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE AND
8 * NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
9 * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
10 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
11 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
12 * IN ANY RESPECT, THE USER ASSUMES THE COST OF ANY NECESSARY SERVICING, REPAIR OR
13 * CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE.
14 * NO USE OF ANY SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
15 * DESY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
16 * OR MODIFICATIONS.
17 * THE FULL LICENSE SPECIFYING FOR THE SOFTWARE THE REDISTRIBUTION, MODIFICATION,
18 * USAGE AND OTHER RIGHTS AND OBLIGATIONS IS INCLUDED WITH THE DISTRIBUTION OF THIS
19 * PROJECT IN THE FILE LICENSE.HTML. IF THE LICENSE IS NOT INCLUDED YOU MAY FIND A COPY
20 * AT HTTP://WWW.DESY.DE/LEGAL/LICENSE.HTM
21 */
22
23 package de.desy.acop.displayers.tools;
24
25 import java.beans.PropertyChangeListener;
26 import java.beans.PropertyVetoException;
27
28 import com.cosylab.util.CommonException;
29
30 import de.desy.acop.transport.ConnectionParameters;
31
32 /**
33 * <code>ConnectionParametersReceiver</code> describes the class that can
34 * accept <code>ConnectionParameters</code>. The purpose of the interface is to
35 * identify the class as the object, whose connectionParameters property
36 * can be configured through property editors. Implementor of this class
37 * should follow java beans conventions.
38 *
39 * @author <a href="mailto:jaka.bobnar@cosylab.com">Jaka Bobnar</a>
40 * @version $Id: Templates.xml,v 1.10 2004/01/13 16:17:13 jbobnar Exp $
41 *
42 */
43 public interface ConnectionParametersReceiver {
44
45 /** ConnectionParameters property name tag */
46 public static final String CONNECTION_PARAMETERS_PROPERTY = "connectionParameters";
47
48 /**
49 * Returns ConnectionParameters associated with this receiver.
50 *
51 * @return the connection parameters
52 */
53 public ConnectionParameters getConnectionParameters();
54
55 /**
56 * Sets the ConnectionParameters to the receiver. If a receiver is a
57 * a displayer it should connect to the remote point upon setting the parameters.
58 *
59 * @param cp new parameters
60 * @throws CommonException if connection establishing failed
61 * @throws PropertyVetoException if setting failed due to improper parameters
62 */
63 public void setConnectionParameters(ConnectionParameters cp) throws CommonException, PropertyVetoException;
64
65 /**
66 * Adds a PropertyChangeListener to this receiver. Listener should receives
67 * notifications when the property with the name <code>propertyName</code> was
68 * changed.
69 *
70 * @param propertyName the name of the property which the listener listens
71 * @param listener the listener
72 */
73 public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
74
75 /**
76 * Removes a PropertyChangeListener associated with the specified property.
77 *
78 * @param propertyName the name of the property which the listener listens
79 * @param listener the listener
80 */
81 public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
82
83 /**
84 * Adds a PropertyChangeListener which listenes to all properties.
85 * @param listener the listener
86 */
87 public void addPropertyChangeListener(PropertyChangeListener listener);
88
89 /**
90 * Removes a PropertyChangeListener.
91 * @param listener
92 */
93 public void removePropertyChangeListener(PropertyChangeListener listener);
94
95 }