Package io.vertx.ext.shell.session
Interface Session
-
public interface SessionA shell session.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Sessioncreate()Create a new empty session.<T> Tget(String key)Get some data from the sessionSessionput(String key, Object obj)Put some data in a session<T> Tremove(String key)Remove some data from the session
-
-
-
Method Detail
-
create
static Session create()
Create a new empty session.- Returns:
- the created session
-
put
Session put(String key, Object obj)
Put some data in a session- Parameters:
key- the key for the dataobj- the data- Returns:
- a reference to this, so the API can be used fluently
-
get
<T> T get(String key)
Get some data from the session- Parameters:
key- the key of the data- Returns:
- the data
-
remove
<T> T remove(String key)
Remove some data from the session- Parameters:
key- the key of the data- Returns:
- the data that was there or null if none there
-
-