|
Added
Link Here
|
| 1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2011 EclipseSource and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
| 8 |
* Contributors: |
| 9 |
* EclipseSource - initial API and implementation |
| 10 |
******************************************************************************/ |
| 11 |
package org.eclipse.rwt.service; |
| 12 |
|
| 13 |
// TODO [DISCUSS_API] |
| 14 |
/** |
| 15 |
* The <code>IApplicationStore</code> can be used as store for data that spans |
| 16 |
* the lifecycle of a web application instance. |
| 17 |
* |
| 18 |
* |
| 19 |
* <p><strong>Note:</strong> the <code>IApplicationStore</code> implementation is used |
| 20 |
* in the so called application-scope. That means all information stored here will be |
| 21 |
* lost once the application web context is destroyed. Application-scope also implies |
| 22 |
* concurrent access. Therefore the implementation of <code>IApplicationStore</code> |
| 23 |
* has to provide a proper synchronization of its storage datastructure.</p> |
| 24 |
* |
| 25 |
* @see org.eclipse.rwt.RWT |
| 26 |
* @since 1.4 |
| 27 |
*/ |
| 28 |
public interface IApplicationStore { |
| 29 |
|
| 30 |
/** |
| 31 |
* Stores the given value object with the given name as key in this |
| 32 |
* <code>IApplicationStore</code> instance. |
| 33 |
*/ |
| 34 |
void setAttribute( String name, Object value ); |
| 35 |
|
| 36 |
/** |
| 37 |
* Returns the value object which is stored under the given name in this |
| 38 |
* <code>IApplicationStore</code> instance or null if no value object has been stored. |
| 39 |
*/ |
| 40 |
Object getAttribute( String name ); |
| 41 |
|
| 42 |
/** |
| 43 |
* Removes the value object which is stored under the given name in this |
| 44 |
* <code>IApplicationStore</code> instance. Does nothing if no value object was stored |
| 45 |
* under the given name. |
| 46 |
*/ |
| 47 |
void removeAttribute( String name ); |
| 48 |
} |