|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.datashare.AbstractShare org.eclipse.ecf.docshare.DocShare
public class DocShare
Represents a document sharing session between two participants.
Nested Class Summary | |
---|---|
static class |
DocShare.SelectionReceiver
|
Field Summary |
---|
Fields inherited from class org.eclipse.ecf.datashare.AbstractShare |
---|
adapter, channel |
Constructor Summary | |
---|---|
DocShare(IChannelContainerAdapter adapter)
Create a document sharing session instance. |
Method Summary | |
---|---|
void |
dispose()
|
ID |
getInitiatorID()
|
ID |
getOtherID()
|
ID |
getOurID()
|
ID |
getReceiverID()
|
org.eclipse.ui.texteditor.ITextEditor |
getTextEditor()
|
protected void |
handleDisconnectEvent(IChannelDisconnectEvent cde)
|
protected void |
handleMessage(ID fromContainerID,
byte[] data)
Receive message for this channel. |
protected void |
handleStartMessage(StartMessage message)
This method called by the handleMessage(ID, byte[]) method if
the type of the message received is a start message (sent by remote party
via startShare(ID, String, ID, String, ITextEditor) . |
protected void |
handleStopMessage(StopMessage message)
|
protected void |
handleUpdateMessage(DocumentChangeMessage documentChangeMessage)
This method called by the handleMessage(ID, byte[]) method if
the type of the message received is an update message. |
boolean |
isInitiator()
|
boolean |
isSharing()
|
void |
startShare(ID our,
java.lang.String fromName,
ID toID,
java.lang.String fileName,
org.eclipse.ui.texteditor.ITextEditor editorPart)
Start sharing an editor's contents between two participants. |
void |
stopShare()
Stop editor sharing. |
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.ecf.datashare.AbstractShare |
---|
getChannel, handleChannelEvent, handleConnectEvent, isDisposed, sendMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DocShare(IChannelContainerAdapter adapter) throws ECFException
adapter
- the IChannelContainerAdapter
to use to create this
document sharing session.
ECFException
- if the channel cannot be created.Method Detail |
---|
public void startShare(ID our, java.lang.String fromName, ID toID, java.lang.String fileName, org.eclipse.ui.texteditor.ITextEditor editorPart)
toID
parameter. The remote receiver will be displayed a
message dialog, and given the option to start editor sharing, or not.
our
- the ID associated with the initiator. Must not be
null
.fromName
- a name to present to the receiver. If
null, our.getName() will be used.toID
- the ID of the intended receiver. Must not be null
.fileName
- the file name of the file to be shared (with suffix type extension). Must not be null
.editorPart
- the text editor currently showing the contents of this editor. Must not be null
.
public void stopShare()
isSharing()
returns true
.
protected void handleMessage(ID fromContainerID, byte[] data)
AbstractShare
handleMessage
in class AbstractShare
fromContainerID
- the ID of the sender container. Will not be null
.data
- the data received on the channel. Will not be null
.protected void handleStartMessage(StartMessage message) throws IDCreateException
handleMessage(ID, byte[])
method if
the type of the message received is a start message (sent by remote party
via startShare(ID, String, ID, String, ITextEditor)
.
message
- the UpdateMessage received.
IDCreateException
protected void handleUpdateMessage(DocumentChangeMessage documentChangeMessage)
handleMessage(ID, byte[])
method if
the type of the message received is an update message.
documentChangeMessage
- the UpdateMessage received.protected void handleStopMessage(StopMessage message)
message
- protected void handleDisconnectEvent(IChannelDisconnectEvent cde)
handleDisconnectEvent
in class AbstractShare
public void dispose()
dispose
in class AbstractShare
public java.lang.String toString()
toString
in class java.lang.Object
public ID getInitiatorID()
public ID getReceiverID()
public ID getOurID()
public org.eclipse.ui.texteditor.ITextEditor getTextEditor()
public boolean isSharing()
public ID getOtherID()
public boolean isInitiator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |