01: package dalma.endpoints.invm;
02:
03: import java.io.Serializable;
04:
05: /**
06: * @author Kohsuke Kawaguchi
07: */
08: public final class Message<T> implements Serializable {
09: /**
10: * Payload of the message.
11: */
12: public T payload;
13:
14: protected Channel from;
15: protected Channel to;
16:
17: public Message() {
18: }
19:
20: public Message(T payload) {
21: this .payload = payload;
22: }
23:
24: /**
25: * Gets the {@link Channel} from which a message was sent.
26: */
27: public Channel getFrom() {
28: return from;
29: }
30:
31: /**
32: * Gets the {@link Channel} to which a message was sent.
33: */
34: public Channel getTo() {
35: return to;
36: }
37: }
|