All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webbitserver.DataHolder Maven / Gradle / Ivy

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();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy