org.webbitserver.DataHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webbit Show documentation
Show all versions of webbit Show documentation
A Java event based WebSocket and HTTP server
package org.webbitserver;
import java.util.Map;
import java.util.Set;
/**
* Objects implementing this interface can have arbitrary named values associated with
* them, making it easy to pass data around an application.
*
* @author Joe Walnes
*/
public interface DataHolder {
/**
* Arbitrary data that can be stored for the lifetime of the connection.
*/
Map data();
/**
* Retrieve data value by key.
*
* @see #data()
*/
Object data(String key);
/**
* Store data value by key.
*
* @see #data()
*/
DataHolder data(String key, Object value);
/**
* List data keys.
*
* @see #data()
*/
Set dataKeys();
}