Line | |
---|
1 | package testcode.actions;
|
---|
2 |
|
---|
3 | import org.eclipse.jdt.annotation.NonNull;
|
---|
4 |
|
---|
5 | import com.fasterxml.jackson.annotation.JsonSubTypes;
|
---|
6 | import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
---|
7 | import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
---|
8 | import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * An action represents a "promise" made by a participant in the negotiation. It
|
---|
12 | * can not be retracted and is immutable. But it can be followed by other
|
---|
13 | * actions that override it or make it outdated.
|
---|
14 | */
|
---|
15 | @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.WRAPPER_OBJECT)
|
---|
16 | @JsonSubTypes({ @JsonSubTypes.Type(value = EndNegotiation.class),
|
---|
17 | @JsonSubTypes.Type(value = Accept.class) })
|
---|
18 | public interface Action {
|
---|
19 | /**
|
---|
20 | *
|
---|
21 | * @return the {@link Id} of the actor of this action.
|
---|
22 | */
|
---|
23 | @NonNull
|
---|
24 | PartyId getActor();
|
---|
25 |
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.