1
2
3
4
5 package spellcast.game;
6
7 import spellcast.model.*;
8 import spellcast.event.*;
9
10 /***
11 * An incoming IPC message. This class contains the GameEvent
12 * sent by a client as well as the IPCHandle and Id needed to
13 * differentiate the messages from clients.
14 *
15 * @author Barrie Treloar
16 */
17 public class IPCRequest
18 {
19 private IPCHandle handle;
20 private Id id;
21 private GameEvent event;
22
23 public IPCRequest( IPCHandle handle,
24 Id id,
25 GameEvent event )
26 {
27 this.handle = handle;
28 this.id = id;
29 this.event = event;
30 }
31
32 /***
33 * Get the value of handle.
34 *
35 * @return value of handle.
36 */
37 public IPCHandle getHandle()
38 {
39 return handle;
40 }
41
42 /***
43 * Set the value of handle.
44 *
45 * @param v Value to assign to handle.
46 */
47 public void setHandle( IPCHandle v )
48 {
49 handle = v;
50 }
51
52 /***
53 * Get the value of id.
54 *
55 * @return value of id.
56 */
57 public Id getId()
58 {
59 return id;
60 }
61
62 /***
63 * Set the value of id.
64 *
65 * @param v Value to assign to id.
66 */
67 public void setID( Id v )
68 {
69 id = v;
70 }
71
72 /***
73 * Get the value of event.
74 *
75 * @return value of event.
76 */
77 public GameEvent getGameEvent()
78 {
79 return event;
80 }
81
82 /***
83 * Set the value of event.
84 *
85 * @param v Value to assign to event.
86 */
87 public void setGameEvent( GameEvent v )
88 {
89 event = v;
90 }
91
92 }
93