01: /* *************************************************************************
02:
03: Millstone(TM)
04: Open Sourced User Interface Library for
05: Internet Development with Java
06:
07: Millstone is a registered trademark of IT Mill Ltd
08: Copyright (C) 2000-2005 IT Mill Ltd
09:
10: *************************************************************************
11:
12: This library is free software; you can redistribute it and/or
13: modify it under the terms of the GNU Lesser General Public
14: license version 2.1 as published by the Free Software Foundation.
15:
16: This library is distributed in the hope that it will be useful,
17: but WITHOUT ANY WARRANTY; without even the implied warranty of
18: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19: Lesser General Public License for more details.
20:
21: You should have received a copy of the GNU Lesser General Public
22: License along with this library; if not, write to the Free Software
23: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24:
25: *************************************************************************
26:
27: For more information, contact:
28:
29: IT Mill Ltd phone: +358 2 4802 7180
30: Ruukinkatu 2-4 fax: +358 2 4802 7181
31: 20540, Turku email: info@itmill.com
32: Finland company www: www.itmill.com
33:
34: Primary source for MillStone information and releases: www.millstone.org
35:
36: ********************************************************************** */
37:
38: package org.millstone.base.terminal;
39:
40: import org.millstone.base.Application;
41:
42: /** This interface must be implemented by classes wishing to provide Application resources.
43: *
44: * Application resources are a set of named resources (pictures, sounds, etc) associated
45: * with some specific application. Having named application resources provides a convenient
46: * method for having inter-theme common resources for an application.
47: *
48: * @author IT Mill Ltd.
49: * @version 3.1.1
50: * @since 3.0
51: */
52: public interface ApplicationResource extends Resource {
53:
54: /** Default cache time. */
55: public static final long DEFAULT_CACHETIME = 1000 * 60 * 60 * 24;
56:
57: /** Get resource as stream */
58: public DownloadStream getStream();
59:
60: /** Get the application of the resource */
61: public Application getApplication();
62:
63: /** Get virtual filename for the resource */
64: public String getFilename();
65:
66: /** Get lenght of cache expiracy time.
67: *
68: * <p>This gives the adapter the possibility cache streams sent to the
69: * client. The caching may be made in adapter or at the client if the
70: * client supports caching. Default is DEFAULT_CACHETIME.</p>
71: *
72: * @return Cache time in milliseconds
73: */
74: public long getCacheTime();
75:
76: /** Get the size of the download buffer used for this resource.
77: *
78: * <p>If the buffer size is 0, the buffer size is decided by the
79: * terminal adapter. The default value is 0.</p>
80: *
81: * @return int The size of the buffer in bytes.
82: */
83: public int getBufferSize();
84:
85: }
|