<li><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ulclass="inheritance">
<li>com.mxgraph.sharing.mxSession</li>
</ul>
</li>
</ul>
<divclass="description">
<ulclass="blockList">
<liclass="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><ahref="../../../com/mxgraph/sharing/mxSharedState.mxDiagramChangeListener.html"title="interface in com.mxgraph.sharing">mxSharedState.mxDiagramChangeListener</a></dd>
</dl>
<hr>
<br>
<pre>public class <spanclass="strong">mxSession</span>
extends <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</a>
implements <ahref="../../../com/mxgraph/sharing/mxSharedState.mxDiagramChangeListener.html"title="interface in com.mxgraph.sharing">mxSharedState.mxDiagramChangeListener</a></pre>
<divclass="block">Implements a session that may be attached to a shared diagram. The session
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Field and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>protected <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuffer.html?is-external=true"title="class or interface in java.lang">StringBuffer</a></code></td>
<divclass="block">Default timeout is 10000 ms.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>protected <ahref="../../../com/mxgraph/sharing/mxSharedState.html"title="class in com.mxgraph.sharing">mxSharedState</a></code></td>
<divclass="block">Reference to the shared diagram.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>protected <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<thclass="colOne"scope="col">Constructor and Description</th>
</tr>
<trclass="altColor">
<tdclass="colOne"><code><strong><ahref="../../../com/mxgraph/sharing/mxSession.html#mxSession(java.lang.String, com.mxgraph.sharing.mxSharedState)">mxSession</a></strong>(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> id,
<ahref="../../../com/mxgraph/sharing/mxSharedState.html"title="class in com.mxgraph.sharing">mxSharedState</a> diagram)</code>
<divclass="block">Constructs a new session with the given ID.</div>
<divclass="block">Destroys the session and removes its listener from the shared diagram.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>void</code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/sharing/mxSession.html#diagramChanged(java.lang.Object, java.lang.String)">diagramChanged</a></strong>(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</a> sender,
<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> edits)</code>
<divclass="block">Fires when the shared diagram was changed.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<tdclass="colFirst"><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<divclass="block">Returns the number of milliseconds this session has been inactive.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<divclass="block">Initializes the session buffer and returns a string that represents the
state of the session.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<divclass="block">Returns the changes received by other sessions for the shared diagram.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a></code></td>
<divclass="block">Returns the changes received by other sessions for the shared diagram.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>void</code></td>
<tdclass="colLast"><code><strong><ahref="../../../com/mxgraph/sharing/mxSession.html#receive(org.w3c.dom.Node)">receive</a></strong>(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Node.html?is-external=true"title="class or interface in org.w3c.dom">Node</a> message)</code>
<divclass="block">Posts the change represented by the given XML string to the shared diagram.</div>
<h3>Methods inherited from class java.lang.<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</a></h3>
<code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</a>, <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</a></code></li>
<divclass="block">Default timeout is 10000 ms.</div>
</li>
</ul>
<aname="id">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>id</h4>
<pre>protected <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> id</pre>
<divclass="block">Holds the session ID.</div>
</li>
</ul>
<aname="diagram">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>diagram</h4>
<pre>protected <ahref="../../../com/mxgraph/sharing/mxSharedState.html"title="class in com.mxgraph.sharing">mxSharedState</a> diagram</pre>
<divclass="block">Reference to the shared diagram.</div>
</li>
</ul>
<aname="buffer">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>buffer</h4>
<pre>protected <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/StringBuffer.html?is-external=true"title="class or interface in java.lang">StringBuffer</a> buffer</pre>
<divclass="block">Holds the send buffer for this session.</div>
</li>
</ul>
<aname="lastTimeMillis">
<!---->
</a>
<ulclass="blockListLast">
<liclass="blockList">
<h4>lastTimeMillis</h4>
<pre>protected long lastTimeMillis</pre>
<divclass="block">Holds the last active time millis.</div>
<pre>public mxSession(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> id,
<ahref="../../../com/mxgraph/sharing/mxSharedState.html"title="class in com.mxgraph.sharing">mxSharedState</a> diagram)</pre>
<divclass="block">Constructs a new session with the given ID.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>id</code> - Specifies the session ID to be used.</dd><dd><code>diagram</code> - Reference to the shared diagram.</dd></dl>
<pre>public <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> getId()</pre>
<divclass="block">Returns the session ID.</div>
</li>
</ul>
<aname="init()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>init</h4>
<pre>public <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> init()</pre>
<divclass="block">Initializes the session buffer and returns a string that represents the
state of the session.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>Returns the initial state of the session.</dd></dl>
</li>
</ul>
<aname="getInitialMessage()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getInitialMessage</h4>
<pre>public <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> getInitialMessage()</pre>
<divclass="block">Returns an XML string that represents the current state of the session
<pre>public void receive(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/Node.html?is-external=true"title="class or interface in org.w3c.dom">Node</a> message)</pre>
<divclass="block">Posts the change represented by the given XML string to the shared diagram.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>message</code> - XML that represents the change.</dd></dl>
</li>
</ul>
<aname="poll()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>poll</h4>
<pre>public <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> poll()
throws <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html?is-external=true"title="class or interface in java.lang">InterruptedException</a></pre>
<divclass="block">Returns the changes received by other sessions for the shared diagram.
<dl><dt><spanclass="strong">Returns:</span></dt><dd>Returns a string representing the changes to the shared diagram.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html?is-external=true"title="class or interface in java.lang">InterruptedException</a></code></dd></dl>
</li>
</ul>
<aname="poll(long)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>poll</h4>
<pre>public <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> poll(long timeout)
throws <ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html?is-external=true"title="class or interface in java.lang">InterruptedException</a></pre>
<divclass="block">Returns the changes received by other sessions for the shared diagram.
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>timeout</code> - Time in milliseconds to wait for changes.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Returns a string representing the changes to the shared diagram.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/InterruptedException.html?is-external=true"title="class or interface in java.lang">InterruptedException</a></code></dd></dl>
<pre>public void diagramChanged(<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</a> sender,
<ahref="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</a> edits)</pre>
<divclass="block"><strong>Description copied from interface: <code><ahref="../../../com/mxgraph/sharing/mxSharedState.mxDiagramChangeListener.html#diagramChanged(java.lang.Object, java.lang.String)">mxSharedState.mxDiagramChangeListener</a></code></strong></div>
<divclass="block">Fires when the shared diagram was changed.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><ahref="../../../com/mxgraph/sharing/mxSharedState.mxDiagramChangeListener.html#diagramChanged(java.lang.Object, java.lang.String)">diagramChanged</a></code> in interface <code><ahref="../../../com/mxgraph/sharing/mxSharedState.mxDiagramChangeListener.html"title="interface in com.mxgraph.sharing">mxSharedState.mxDiagramChangeListener</a></code></dd>
<dt><spanclass="strong">Parameters:</span></dt><dd><code>sender</code> - Session where the change was received from.</dd><dd><code>edits</code> - String that represents the edits.</dd></dl>