1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sourceforge.servletspy;
24
25 /***
26 * The <code>IContext</code> describes the context for a subject to node graph
27 * serialization.
28 *
29 * @author arno schumacher
30 */
31 public interface IContext {
32 /*** Passes the serialization task to the next handler. */
33 void proceed();
34
35 /***
36 * Returns the name of the current serialization task.
37 *
38 * @return The name of the serialization task.
39 */
40 String getName();
41
42 /***
43 * Returns the current result of the serialization task.
44 *
45 * @return The value
46 */
47 String getValue();
48
49 /***
50 * Sets the result of the serialization task.
51 *
52 * @param value
53 * The result
54 */
55 void setValue(final String value);
56
57 /***
58 * Invalidates the current context. The current result will not be part of
59 * the serialization node graph.
60 */
61 void invalidate();
62
63 /***
64 * Asks the engine to do a serialization for the provided subject.
65 *
66 * @param name
67 * The name of subject
68 * @param subject
69 * The subject to be serialized
70 */
71 void add(final String name, final Object subject);
72
73 /***
74 * Returns the current subject, the object to be serialized.
75 *
76 * @return The subject.
77 */
78 Object getSubject();
79
80 /***
81 * Replaces the current subject by the provided object.
82 *
83 * @param object
84 * The new subject.
85 */
86 void setSubject(final Object object);
87 }