public class DocShare extends AbstractShare
| Modifier and Type | Class and Description |
|---|---|
static class |
DocShare.SelectionReceiver |
adapter, channel| Constructor and Description |
|---|
DocShare(IChannelContainerAdapter adapter)
Create a document sharing session instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
ID |
getInitiatorID() |
ID |
getOtherID() |
ID |
getOurID() |
ID |
getReceiverID() |
org.eclipse.ui.texteditor.ITextEditor |
getTextEditor() |
protected void |
handleDisconnectEvent(org.eclipse.ecf.datashare.events.IChannelDisconnectEvent cde) |
protected void |
handleMessage(ID fromContainerID,
byte[] data)
Receive message for this channel.
|
protected void |
handleStartMessage(org.eclipse.ecf.docshare.messages.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(org.eclipse.ecf.docshare.messages.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,
String fromName,
ID toID,
String fileName,
org.eclipse.ui.texteditor.ITextEditor editorPart)
Start sharing an editor's contents between two participants.
|
void |
stopShare()
Stop editor sharing.
|
String |
toString() |
getChannel, handleChannelEvent, handleConnectEvent, isDisposed, sendMessagepublic DocShare(IChannelContainerAdapter adapter) throws ECFException
adapter - the IChannelContainerAdapter to use to create this
document sharing session.ECFException - if the channel cannot be created.public void startShare(ID our, String fromName, ID toID, 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)
AbstractSharehandleMessage in class AbstractSharefromContainerID - the ID of the sender container. Will not be null.data - the data received on the channel. Will not be null.protected void handleStartMessage(org.eclipse.ecf.docshare.messages.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.IDCreateExceptionprotected 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(org.eclipse.ecf.docshare.messages.StopMessage message)
message - protected void handleDisconnectEvent(org.eclipse.ecf.datashare.events.IChannelDisconnectEvent cde)
handleDisconnectEvent in class AbstractSharepublic void dispose()
dispose in class AbstractSharepublic ID getInitiatorID()
public ID getReceiverID()
public ID getOurID()
public org.eclipse.ui.texteditor.ITextEditor getTextEditor()
public boolean isSharing()
public ID getOtherID()
public boolean isInitiator()
Copyright © 2019 Eclipse Foundation. All rights reserved.