|
JGraph X 1.4.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.sharing.mxSession
public class mxSession
Implements a session that may be attached to a shared diagram.
| Field Summary | |
|---|---|
protected StringBuffer |
buffer
Holds the send buffer for this session. |
static int |
DEFAULT_TIMEOUT
Default timeout is 10000 ms. |
protected mxSharedDiagram |
diagram
Reference to the shared diagram. |
protected String |
id
Holds the session ID. |
protected long |
lastTimeMillis
Holds the last active time millis. |
| Constructor Summary | |
|---|---|
mxSession(String id,
mxSharedDiagram diagram)
Constructs a new session with the given ID. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the session and removes its listener from the shared diagram. |
void |
diagramChanged(Object sender,
String xml)
Fires when the shared diagram was changed. |
String |
getId()
Returns the session ID. |
String |
getInitialState()
Returns an XML string that represents the current state of the session and the shared diagram. |
long |
inactiveTimeMillis()
Returns the number of milliseconds this session has been inactive. |
String |
init()
Initializes the session buffer and returns a string that represents the state of the session. |
String |
poll()
Returns the changes received by other sessions for the shared diagram. |
String |
poll(long timeout)
Returns the changes received by other sessions for the shared diagram. |
void |
post(String xml)
Posts the change represented by the given XML string to the shared diagram. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int DEFAULT_TIMEOUT
protected String id
protected mxSharedDiagram diagram
protected StringBuffer buffer
protected long lastTimeMillis
| Constructor Detail |
|---|
public mxSession(String id,
mxSharedDiagram diagram)
id - Specifies the session ID to be used.diagram - Reference to the shared diagram.| Method Detail |
|---|
public String getId()
public String getInitialState()
public String init()
public void post(String xml)
xml - XML string that represents the change.
public String poll()
throws InterruptedException
InterruptedException
public String poll(long timeout)
throws InterruptedException
timeout - Time in milliseconds to wait for changes.
InterruptedExceptionpublic long inactiveTimeMillis()
public void diagramChanged(Object sender,
String xml)
mxSharedDiagram.mxDiagramChangeListener
diagramChanged in interface mxSharedDiagram.mxDiagramChangeListenersender - Session where the change was received from.xml - XML string that represents the change.public void destroy()
|
JGraph X 1.4.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||