Files
Brainstorm/Foundation Web Interfaces/src/com/foundation/web/interfaces/IConnectionContext.java

21 lines
1.4 KiB
Java
Raw Normal View History

package com.foundation.web.interfaces;
/**
* The context object available to the web application where connection related data can be stored and released within the context of a single connection between the client and server.
* Used to store data related to a single socket between the web browser and web server, such as a socket to a service that the server needs in order to service the client's requests.
* The data will be given an opportunity to be cleaned up upon the socket's closure if it implements com.foundation.web.interfaces.ISessionLifecycleAware.
*/
public interface IConnectionContext {
/**
* Gets the application data in the connection context's application data map by the given key.
* @return The application specific data element.
*/
public Object getApplicationData(String key);
/**
* Stores the application data in the connection context's application data map by the given key.
* The application data may implement ISessionLifecycleAware if it should be called when the session is being released. This will only be called for a normal closing of the session. The session may still be restored at some time in the future.
* @param key The key for the data. If the key is logically equal (equivalent) to an existing key, then the existing data will be replaced and returned.
* @param applicationData The application specific data element.
*/
public void setApplicationData(String key, Object applicationData);
}//IConnectionContext//