1 /*
2 * Copyright (c) 2005, The K-Wf Grid Consortium
3 * Fraunhofer Institute for Computer Architecture and Software Technology
4 * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5 */
6 package net.kwfgrid.gwes.uiproxy;
7
8 import java.util.Properties;
9
10 /**
11 Interface for all buffers in the proxy.
12 */
13 public interface Buffer extends Consumer {
14 /**
15 Get the buffers unique ID.
16 */
17 String getID();
18 /**
19 Set the buffers properties.
20 */
21 void setProperties(Properties props) throws BufferException;
22 /**
23 Set a property of the buffer.
24 */
25 void setProperty(String name, String value) throws BufferException;
26 /**
27 Handle a message.
28 The buffer itself determines if it is responsible for buffering the specified Message.
29 Buffer overflows or other exceptions must be remembered internally and notified on forthcoming calls of <code>read()</code>.
30 @param message The message.
31 */
32 void handle(Object message);
33 /**
34 Read buffered messages. Details are determined by the implementations.
35 @exception BufferException If a message could not be handled for some reason.
36 */
37 Object[] read() throws BufferException;
38 }