forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlashMap.java
More file actions
42 lines (35 loc) · 830 Bytes
/
FlashMap.java
File metadata and controls
42 lines (35 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby;
import io.jooby.internal.FlashMapImpl;
import javax.annotation.Nonnull;
import java.util.Map;
/**
* Flash map.
*
* @author edgar
* @since 2.0.0
*/
public interface FlashMap extends Map<String, String> {
/** Flash map attribute. */
String NAME = "flash";
/**
* Creates a new flash-scope using the given cookie.
*
* @param ctx Web context.
* @param template Cookie template.
* @return A new flash map.
*/
static @Nonnull FlashMap create(@Nonnull Context ctx, @Nonnull Cookie template) {
return new FlashMapImpl(ctx, template);
}
/**
* Keep flash cookie for next request.
*
* @return This flash map.
*/
@Nonnull FlashMap keep();
}