blob: fa4624ec30d682291918fe33a749b5d0dcc8211b (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol;
/**
* The WhiteboardSessionState class reflects the current state of a whiteboard
* session.
*
* @author Julien Waechter
* @author Emil Ivov
*/
public class WhiteboardSessionState
{
/**
* This constant containing a String representation of the
* WHITEBOARD_INITIALIZATION state.
* <p>
* This constant has the String value "Initializing".
*/
public static final String _WHITEBOARD_INITIALIZATION = "Initializing";
/**
* This constant value indicates that the associated whiteboard
* is currently in an initialization state.
*/
public static final WhiteboardSessionState WHITEBOARD_INITIALIZATION
= new WhiteboardSessionState(_WHITEBOARD_INITIALIZATION);
/**
* This constant containing a String representation
* of the WHITEBOARD_IN_PROGRESS state.
* <p>
* This constant has the String value "In Progress".
*/
public static final String _WHITEBOARD_IN_PROGRESS = "In Progress";
/**
* This constant value indicates that the associated whiteboard
* is currently in an active state.
*/
public static final WhiteboardSessionState WHITEBOARD_IN_PROGRESS
= new WhiteboardSessionState(_WHITEBOARD_IN_PROGRESS);
/**
* This constant containing a String representation of the
* WHITEBOARD_ENDED state.
* <p>
* This constant has the String value "Ended".
*/
public static final String _WHITEBOARD_ENDED = "Ended";
/**
* This constant value indicates that the associated whiteboard
* is currently in a terminated phase.
*/
public static final WhiteboardSessionState WHITEBOARD_ENDED =
new WhiteboardSessionState(_WHITEBOARD_ENDED);
/**
* A string representationf this Whiteboard State. Could be
* _WHITEBOARD_INITIALIZATION, _WHITEBOARD_IN_PROGRESS, _WHITEBOARD_ENDED.
*/
private String whiteboardStateStr;
/**
* Create a whiteboard state object with a value corresponding
* to the specified string.
* @param whiteboardState a string representation of the state.
*/
private WhiteboardSessionState(String whiteboardState)
{
this.whiteboardStateStr = whiteboardState;
}
/**
* Returns a String representation of tha WhiteboardSte.
*
* @return a string value (one of the _WHITEBOARD_XXX constants)
* representing this whiteboard state).
*/
public String getStateString()
{
return whiteboardStateStr;
}
/**
* Returns a string represenation of this whiteboard state.
* Strings returned by this method have the following format:
* "WhiteboardState:<STATE_STRING>" and are meant to be used
* for loggin/debugging purposes.
* @return a string representation of this object.
*/
@Override
public String toString()
{
return getClass().getName()+":"+getStateString();
}
}
|