Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » General Tips
General Tips [message #618816] Fri, 06 July 2007 20:42 Go to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
Hi-ya,

I am running an open source project called the bigblogzoo. In our next
release we are concentrating on the community aspect of the application, and
we would like to integrate ecf, therefore it would be great if you could
give us some pointers.

Ideally we would like to do the following:
a) have a chat client
b) be able to share a View ie a TreeViewer. This sharing could be somehow
messaging based, ie an encoded message is parsed on the reciever's side
which fires a message to open the tree to a certain node.
c) be able to cobrowse. I can't seem to get this to work or find
documentation for this.
d) do all of this with out hosting an ecf server, ie be able to use
providers like google or yahoo

Any tips on how to start would be grand.

Thanks.

Kent

ps you can find more info about the bigblogzoo here:
http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20




http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
Re: General Tips [message #618818 is a reply to message #618816] Sat, 07 July 2007 21:35 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Kent,

kent wrote:
> Hi-ya,
>
> I am running an open source project called the bigblogzoo. In our next
> release we are concentrating on the community aspect of the application,
> and we would like to integrate ecf, therefore it would be great if you
> could give us some pointers.
>
> Ideally we would like to do the following:
> a) have a chat client
> b) be able to share a View ie a TreeViewer. This sharing could be
> somehow messaging based, ie an encoded message is parsed on the
> reciever's side which fires a message to open the tree to a certain node.
> c) be able to cobrowse. I can't seem to get this to work or find
> documentation for this.
> d) do all of this with out hosting an ecf server, ie be able to use
> providers like google or yahoo
>
> Any tips on how to start would be grand.

I think the best way for you to go, given 'd' is to use the ECF
datashare API (for 'a', 'b' and 'c') for the data you wish to exchange
(i.e. for b and c).

'a' is a little problematic, however, given 'd' (if you mean multiuser
chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
multiuser chat (although I've heard rumors that they intend to), and the
ECF yahoo provider does not (yet) implement the ECF chat APIs (we have
an enhancement request for that here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
yourself to the cc to 'vote' for this bug)

But in any event, you should be able to use the datashare API to
exchange messages for the TreeViewer and to do URL co-browsing.

The basic pattern for getting a datashare channel (a messaging channel
for arbitrary data), is:

// Get a container instance...somehow
IContainer container = <get through some means...see below>

// Get the IChannelContainerAdapter
IChannelContainerAdapter channelContainerAdapter =
(IChannelContainerAdapter)
container.getAdapter(IChannelContainerAdapter.class);

// Create a named channel ("mychannel") to use for your messaging
IChannel channel =
channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
null);

// Use the channel.sendMessage() to send messages to channel, and
//listener.handleChannelEvent to receive from to channel. Remember that
// the thread that calls listener.handleChannelEvent(event) is unlikely
// to be the UI thread, and it can be called at any time.

Note that the datashare API is currently implemented by the XMPP
provider, the skype provider, the ECF generic provider, and the JMS
provider. We haven't yet had the chance to implement it with the Yahoo
provider.

Here are the Datashare API docs, with pointers to test code, javadocs,
and source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API

Now, you may be wondering...how do you get a hold of an IContainer
instance (to start the above process)? There are essentially three
ways...and which is desireable to you depends upon what kind/level of UI
integration you want with the existing UI (some, none, full):

1) Query the IContainerManager. There is an OSGI service for ECF called
IContainerManager. It provides access to all the previously-created
IContainer instances. You access it in the normal way for OSGI services
(e.g.)

ServiceTracker tracker = new
ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
tracker.open();
IContainerManager manager = (IContainerManager) tracker.getService();
IContainer [] containers = manager.getAllContainers();
// look for container in containers[] that you are interested in

2) Create a new IContainer instance and connect it yourself. You would
want to do this if you want to have users connect to an account that
only shows your own user interface (rather than integrates with the
existing roster view and/or chat UI). To create/connect an IContainer,
use the ECF ContainerFactory:

IContainer container =
ContainerFactory.getDefault().createContainer("<type>");

where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or "ecf.yahoo.jymsg"
for yahoo.

3) Get an IContainer instance from the existing UI. For example, if the
user connects to their google talk account, using the existing ECF UI,
this will bring up the "Contacts" View. This view is implemented in
org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse 3.3 UI,
it's possible to add UI to existing views (e.g. menu items, etc). From
these additions, it's possible to access the selected roster elements
(i.e. IRoster and IRosterEntrys), and get the IContainer from (e.g.)
IRosterEntry (your buddy). So, for example, if the current selection is
your buddy:

IRosterEntry rosterEntry = (IRosterEntry) getSelection();

IContainer container =
rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);

This allows full integration with the MultiRosterView/Contacts view...if
this is desired.

There are two examples of doing this in the
org.eclipse.ecf.presence.collab.ui plugin:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject

This uses the org.eclipse.ui.menus.menuContribution extension point to
add dynamic menu items to the
org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also, see
the URLShare and ViewShare classes in this plugin as examples of adding
simple protocols for remote URL launching and remote View opening.

Finally, I think that Marcelo Mayworm (an ECF committer) was going to do
some work on modifying the Eclipse built-in browser so that it would
allow automatic co-browsing rather than the user-initiated co-browsing
that is there now. You may want to work together on this. And Kent if
you can contribute back any of these applications to ECF, this would be
most welcome.

Thanks,


Scott












>
> Thanks.
>
> Kent
>
> ps you can find more info about the bigblogzoo here:
> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>
>
>
>
> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
Re: General Tips [message #618819 is a reply to message #618818] Sun, 08 July 2007 20:40 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
Thanks for the details and links. We would be happy to contribute back some
application code.

So it seems that if I want multi-user chat in the near future it might be a
good idea to host an ecf server (by the way I voted for the yahoo issue).

I currently have a linux based virtual private server at our disposal. I was
worried about hosting due to the amount of computing resources required by
the server (this is not a dedicated server). Is there an installation guide
for the server for linux?

"Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
news:46900715.905@composent.com...
> Hi Kent,
>
> kent wrote:
>> Hi-ya,
>>
>> I am running an open source project called the bigblogzoo. In our next
>> release we are concentrating on the community aspect of the application,
>> and we would like to integrate ecf, therefore it would be great if you
>> could give us some pointers.
>>
>> Ideally we would like to do the following:
>> a) have a chat client
>> b) be able to share a View ie a TreeViewer. This sharing could be somehow
>> messaging based, ie an encoded message is parsed on the reciever's side
>> which fires a message to open the tree to a certain node.
>> c) be able to cobrowse. I can't seem to get this to work or find
>> documentation for this.
>> d) do all of this with out hosting an ecf server, ie be able to use
>> providers like google or yahoo
>>
>> Any tips on how to start would be grand.
>
> I think the best way for you to go, given 'd' is to use the ECF datashare
> API (for 'a', 'b' and 'c') for the data you wish to exchange (i.e. for b
> and c).
>
> 'a' is a little problematic, however, given 'd' (if you mean multiuser
> chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
> multiuser chat (although I've heard rumors that they intend to), and the
> ECF yahoo provider does not (yet) implement the ECF chat APIs (we have an
> enhancement request for that here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add yourself
> to the cc to 'vote' for this bug)
>
> But in any event, you should be able to use the datashare API to exchange
> messages for the TreeViewer and to do URL co-browsing.
>
> The basic pattern for getting a datashare channel (a messaging channel for
> arbitrary data), is:
>
> // Get a container instance...somehow
> IContainer container = <get through some means...see below>
>
> // Get the IChannelContainerAdapter
> IChannelContainerAdapter channelContainerAdapter =
> (IChannelContainerAdapter)
> container.getAdapter(IChannelContainerAdapter.class);
>
> // Create a named channel ("mychannel") to use for your messaging
> IChannel channel =
> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
> null);
>
> // Use the channel.sendMessage() to send messages to channel, and
> //listener.handleChannelEvent to receive from to channel. Remember that
> // the thread that calls listener.handleChannelEvent(event) is unlikely
> // to be the UI thread, and it can be called at any time.
>
> Note that the datashare API is currently implemented by the XMPP provider,
> the skype provider, the ECF generic provider, and the JMS provider. We
> haven't yet had the chance to implement it with the Yahoo provider.
>
> Here are the Datashare API docs, with pointers to test code, javadocs, and
> source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>
> Now, you may be wondering...how do you get a hold of an IContainer
> instance (to start the above process)? There are essentially three
> ways...and which is desireable to you depends upon what kind/level of UI
> integration you want with the existing UI (some, none, full):
>
> 1) Query the IContainerManager. There is an OSGI service for ECF called
> IContainerManager. It provides access to all the previously-created
> IContainer instances. You access it in the normal way for OSGI services
> (e.g.)
>
> ServiceTracker tracker = new
> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
> tracker.open();
> IContainerManager manager = (IContainerManager) tracker.getService();
> IContainer [] containers = manager.getAllContainers();
> // look for container in containers[] that you are interested in
>
> 2) Create a new IContainer instance and connect it yourself. You would
> want to do this if you want to have users connect to an account that only
> shows your own user interface (rather than integrates with the existing
> roster view and/or chat UI). To create/connect an IContainer, use the ECF
> ContainerFactory:
>
> IContainer container =
> ContainerFactory.getDefault().createContainer("<type>");
>
> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or "ecf.yahoo.jymsg"
> for yahoo.
>
> 3) Get an IContainer instance from the existing UI. For example, if the
> user connects to their google talk account, using the existing ECF UI,
> this will bring up the "Contacts" View. This view is implemented in
> org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse 3.3 UI,
> it's possible to add UI to existing views (e.g. menu items, etc). From
> these additions, it's possible to access the selected roster elements
> (i.e. IRoster and IRosterEntrys), and get the IContainer from (e.g.)
> IRosterEntry (your buddy). So, for example, if the current selection is
> your buddy:
>
> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>
> IContainer container =
> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>
> This allows full integration with the MultiRosterView/Contacts view...if
> this is desired.
>
> There are two examples of doing this in the
> org.eclipse.ecf.presence.collab.ui plugin:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>
> This uses the org.eclipse.ui.menus.menuContribution extension point to add
> dynamic menu items to the org.eclipse.ecf.presence.ui.MultiRosterView
> context menus. Also, see the URLShare and ViewShare classes in this
> plugin as examples of adding simple protocols for remote URL launching and
> remote View opening.
>
> Finally, I think that Marcelo Mayworm (an ECF committer) was going to do
> some work on modifying the Eclipse built-in browser so that it would allow
> automatic co-browsing rather than the user-initiated co-browsing that is
> there now. You may want to work together on this. And Kent if you can
> contribute back any of these applications to ECF, this would be most
> welcome.
>
> Thanks,
>
>
> Scott
>
>
>
>
>
>
>
>
>
>
>
>
>>
>> Thanks.
>>
>> Kent
>>
>> ps you can find more info about the bigblogzoo here:
>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>
>>
>>
>>
>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
Re: General Tips [message #618820 is a reply to message #618819] Sun, 08 July 2007 21:28 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
One tiny thing more, how much or how little does an ecf server do about user
authentification and registration?

thanks again

"kent" <kentgibson@yahoo.com> schrieb im Newsbeitrag
news:f6ri4s$3a6$1@build.eclipse.org...
> Thanks for the details and links. We would be happy to contribute back
> some application code.
>
> So it seems that if I want multi-user chat in the near future it might be
> a good idea to host an ecf server (by the way I voted for the yahoo
> issue).
>
> I currently have a linux based virtual private server at our disposal. I
> was worried about hosting due to the amount of computing resources
> required by the server (this is not a dedicated server). Is there an
> installation guide for the server for linux?
>
> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
> news:46900715.905@composent.com...
>> Hi Kent,
>>
>> kent wrote:
>>> Hi-ya,
>>>
>>> I am running an open source project called the bigblogzoo. In our next
>>> release we are concentrating on the community aspect of the application,
>>> and we would like to integrate ecf, therefore it would be great if you
>>> could give us some pointers.
>>>
>>> Ideally we would like to do the following:
>>> a) have a chat client
>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>> somehow messaging based, ie an encoded message is parsed on the
>>> reciever's side which fires a message to open the tree to a certain
>>> node.
>>> c) be able to cobrowse. I can't seem to get this to work or find
>>> documentation for this.
>>> d) do all of this with out hosting an ecf server, ie be able to use
>>> providers like google or yahoo
>>>
>>> Any tips on how to start would be grand.
>>
>> I think the best way for you to go, given 'd' is to use the ECF datashare
>> API (for 'a', 'b' and 'c') for the data you wish to exchange (i.e. for b
>> and c).
>>
>> 'a' is a little problematic, however, given 'd' (if you mean multiuser
>> chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
>> multiuser chat (although I've heard rumors that they intend to), and the
>> ECF yahoo provider does not (yet) implement the ECF chat APIs (we have an
>> enhancement request for that here
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add yourself
>> to the cc to 'vote' for this bug)
>>
>> But in any event, you should be able to use the datashare API to exchange
>> messages for the TreeViewer and to do URL co-browsing.
>>
>> The basic pattern for getting a datashare channel (a messaging channel
>> for arbitrary data), is:
>>
>> // Get a container instance...somehow
>> IContainer container = <get through some means...see below>
>>
>> // Get the IChannelContainerAdapter
>> IChannelContainerAdapter channelContainerAdapter =
>> (IChannelContainerAdapter)
>> container.getAdapter(IChannelContainerAdapter.class);
>>
>> // Create a named channel ("mychannel") to use for your messaging
>> IChannel channel =
>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>> null);
>>
>> // Use the channel.sendMessage() to send messages to channel, and
>> //listener.handleChannelEvent to receive from to channel. Remember that
>> // the thread that calls listener.handleChannelEvent(event) is unlikely
>> // to be the UI thread, and it can be called at any time.
>>
>> Note that the datashare API is currently implemented by the XMPP
>> provider, the skype provider, the ECF generic provider, and the JMS
>> provider. We haven't yet had the chance to implement it with the Yahoo
>> provider.
>>
>> Here are the Datashare API docs, with pointers to test code, javadocs,
>> and source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>
>> Now, you may be wondering...how do you get a hold of an IContainer
>> instance (to start the above process)? There are essentially three
>> ways...and which is desireable to you depends upon what kind/level of UI
>> integration you want with the existing UI (some, none, full):
>>
>> 1) Query the IContainerManager. There is an OSGI service for ECF called
>> IContainerManager. It provides access to all the previously-created
>> IContainer instances. You access it in the normal way for OSGI services
>> (e.g.)
>>
>> ServiceTracker tracker = new
>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>> tracker.open();
>> IContainerManager manager = (IContainerManager) tracker.getService();
>> IContainer [] containers = manager.getAllContainers();
>> // look for container in containers[] that you are interested in
>>
>> 2) Create a new IContainer instance and connect it yourself. You would
>> want to do this if you want to have users connect to an account that only
>> shows your own user interface (rather than integrates with the existing
>> roster view and/or chat UI). To create/connect an IContainer, use the
>> ECF ContainerFactory:
>>
>> IContainer container =
>> ContainerFactory.getDefault().createContainer("<type>");
>>
>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or "ecf.yahoo.jymsg"
>> for yahoo.
>>
>> 3) Get an IContainer instance from the existing UI. For example, if the
>> user connects to their google talk account, using the existing ECF UI,
>> this will bring up the "Contacts" View. This view is implemented in
>> org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse 3.3 UI,
>> it's possible to add UI to existing views (e.g. menu items, etc). From
>> these additions, it's possible to access the selected roster elements
>> (i.e. IRoster and IRosterEntrys), and get the IContainer from (e.g.)
>> IRosterEntry (your buddy). So, for example, if the current selection is
>> your buddy:
>>
>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>
>> IContainer container =
>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>
>> This allows full integration with the MultiRosterView/Contacts view...if
>> this is desired.
>>
>> There are two examples of doing this in the
>> org.eclipse.ecf.presence.collab.ui plugin:
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>
>> This uses the org.eclipse.ui.menus.menuContribution extension point to
>> add dynamic menu items to the org.eclipse.ecf.presence.ui.MultiRosterView
>> context menus. Also, see the URLShare and ViewShare classes in this
>> plugin as examples of adding simple protocols for remote URL launching
>> and remote View opening.
>>
>> Finally, I think that Marcelo Mayworm (an ECF committer) was going to do
>> some work on modifying the Eclipse built-in browser so that it would
>> allow automatic co-browsing rather than the user-initiated co-browsing
>> that is there now. You may want to work together on this. And Kent if
>> you can contribute back any of these applications to ECF, this would be
>> most welcome.
>>
>> Thanks,
>>
>>
>> Scott
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>
>>> Thanks.
>>>
>>> Kent
>>>
>>> ps you can find more info about the bigblogzoo here:
>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>
>>>
>>>
>>>
>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>
Re: General Tips [message #618821 is a reply to message #618819] Sun, 08 July 2007 21:35 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Kent,

kent wrote:
> Thanks for the details and links. We would be happy to contribute back
> some application code.
>
> So it seems that if I want multi-user chat in the near future it might
> be a good idea to host an ecf server (by the way I voted for the yahoo
> issue).

It need not be an ecf server. You could also run an XMPP server (and
use xmpp multiuser chat).
http://www.igniterealtime.org/projects/openfire/index.jsp

>
> I currently have a linux based virtual private server at our disposal. I
> was worried about hosting due to the amount of computing resources
> required by the server (this is not a dedicated server).

The computing resources are not huge for the ecf generic server. See
some data recently collected here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=193502

But we haven't done much/any production-level tuning of the generic server.

Another possibility is to use the JMS provider and some JMS-server.


Is there an
> installation guide for the server for linux?

No...sorry about that. The (newly updated with support for Eclipse
IApplication) applies pretty equally well to all environs where Equinox
and Eclipse run.

http://wiki.eclipse.org/ECF_Servers#Starting_an_ECF_Generic_ Server_as_Eclipse_Application_.28ECF_1.0.1_ETA:_7.2F13.2F200 7.29

Scott


>
> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
> news:46900715.905@composent.com...
>> Hi Kent,
>>
>> kent wrote:
>>> Hi-ya,
>>>
>>> I am running an open source project called the bigblogzoo. In our
>>> next release we are concentrating on the community aspect of the
>>> application, and we would like to integrate ecf, therefore it would
>>> be great if you could give us some pointers.
>>>
>>> Ideally we would like to do the following:
>>> a) have a chat client
>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>> somehow messaging based, ie an encoded message is parsed on the
>>> reciever's side which fires a message to open the tree to a certain
>>> node.
>>> c) be able to cobrowse. I can't seem to get this to work or find
>>> documentation for this.
>>> d) do all of this with out hosting an ecf server, ie be able to use
>>> providers like google or yahoo
>>>
>>> Any tips on how to start would be grand.
>>
>> I think the best way for you to go, given 'd' is to use the ECF
>> datashare API (for 'a', 'b' and 'c') for the data you wish to exchange
>> (i.e. for b and c).
>>
>> 'a' is a little problematic, however, given 'd' (if you mean multiuser
>> chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
>> multiuser chat (although I've heard rumors that they intend to), and
>> the ECF yahoo provider does not (yet) implement the ECF chat APIs (we
>> have an enhancement request for that here
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
>> yourself to the cc to 'vote' for this bug)
>>
>> But in any event, you should be able to use the datashare API to
>> exchange messages for the TreeViewer and to do URL co-browsing.
>>
>> The basic pattern for getting a datashare channel (a messaging channel
>> for arbitrary data), is:
>>
>> // Get a container instance...somehow
>> IContainer container = <get through some means...see below>
>>
>> // Get the IChannelContainerAdapter
>> IChannelContainerAdapter channelContainerAdapter =
>> (IChannelContainerAdapter)
>> container.getAdapter(IChannelContainerAdapter.class);
>>
>> // Create a named channel ("mychannel") to use for your messaging
>> IChannel channel =
>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>> null);
>>
>> // Use the channel.sendMessage() to send messages to channel, and
>> //listener.handleChannelEvent to receive from to channel. Remember
>> that // the thread that calls listener.handleChannelEvent(event) is
>> unlikely
>> // to be the UI thread, and it can be called at any time.
>>
>> Note that the datashare API is currently implemented by the XMPP
>> provider, the skype provider, the ECF generic provider, and the JMS
>> provider. We haven't yet had the chance to implement it with the
>> Yahoo provider.
>>
>> Here are the Datashare API docs, with pointers to test code, javadocs,
>> and source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>
>> Now, you may be wondering...how do you get a hold of an IContainer
>> instance (to start the above process)? There are essentially three
>> ways...and which is desireable to you depends upon what kind/level of
>> UI integration you want with the existing UI (some, none, full):
>>
>> 1) Query the IContainerManager. There is an OSGI service for ECF
>> called IContainerManager. It provides access to all the
>> previously-created IContainer instances. You access it in the normal
>> way for OSGI services (e.g.)
>>
>> ServiceTracker tracker = new
>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>> tracker.open();
>> IContainerManager manager = (IContainerManager) tracker.getService();
>> IContainer [] containers = manager.getAllContainers();
>> // look for container in containers[] that you are interested in
>>
>> 2) Create a new IContainer instance and connect it yourself. You
>> would want to do this if you want to have users connect to an account
>> that only shows your own user interface (rather than integrates with
>> the existing roster view and/or chat UI). To create/connect an
>> IContainer, use the ECF ContainerFactory:
>>
>> IContainer container =
>> ContainerFactory.getDefault().createContainer("<type>");
>>
>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or
>> "ecf.yahoo.jymsg" for yahoo.
>>
>> 3) Get an IContainer instance from the existing UI. For example, if
>> the user connects to their google talk account, using the existing ECF
>> UI, this will bring up the "Contacts" View. This view is implemented
>> in org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse
>> 3.3 UI, it's possible to add UI to existing views (e.g. menu items,
>> etc). From these additions, it's possible to access the selected
>> roster elements (i.e. IRoster and IRosterEntrys), and get the
>> IContainer from (e.g.) IRosterEntry (your buddy). So, for example, if
>> the current selection is your buddy:
>>
>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>
>> IContainer container =
>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>
>>
>> This allows full integration with the MultiRosterView/Contacts
>> view...if this is desired.
>>
>> There are two examples of doing this in the
>> org.eclipse.ecf.presence.collab.ui plugin:
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>
>>
>> This uses the org.eclipse.ui.menus.menuContribution extension point to
>> add dynamic menu items to the
>> org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also, see
>> the URLShare and ViewShare classes in this plugin as examples of
>> adding simple protocols for remote URL launching and remote View opening.
>>
>> Finally, I think that Marcelo Mayworm (an ECF committer) was going to
>> do some work on modifying the Eclipse built-in browser so that it
>> would allow automatic co-browsing rather than the user-initiated
>> co-browsing that is there now. You may want to work together on
>> this. And Kent if you can contribute back any of these applications
>> to ECF, this would be most welcome.
>>
>> Thanks,
>>
>>
>> Scott
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>
>>> Thanks.
>>>
>>> Kent
>>>
>>> ps you can find more info about the bigblogzoo here:
>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>
>>>
>>>
>>>
>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>
Re: General Tips [message #618822 is a reply to message #618820] Mon, 09 July 2007 05:12 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Kent,

kent wrote:
> One tiny thing more,

No problem. Feel free to ask away.

how much or how little does an ecf server do about
> user authentification and registration?

The ECF generic server implements an interface:

org.eclipse.ecf.core.sharedobject.ISharedObjectContainerGrou pManager
which exposes a method setConnectPolicy(IConnectHandlerPolicy). The
given IConnectHandlerPolicy (if non-null) will be consulted when connect
requests are received.

For the newly created org.eclipse.ecf.provider.app.GenericServer class
you can see that it sets up a connect policy that simply prints out to
System.out that the client connected. The src for that class is here

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/a pp/GenericServer.java?root=Technology_Project&view=log

In order to set to your own connect policy you need to create your own
IApplication, and programmatically set the connect policy. I'll modify
the methods on GenericServer so that you can use GenericServer/and
override yourself.

Scott


>
> thanks again
>
> "kent" <kentgibson@yahoo.com> schrieb im Newsbeitrag
> news:f6ri4s$3a6$1@build.eclipse.org...
>> Thanks for the details and links. We would be happy to contribute back
>> some application code.
>>
>> So it seems that if I want multi-user chat in the near future it might
>> be a good idea to host an ecf server (by the way I voted for the yahoo
>> issue).
>>
>> I currently have a linux based virtual private server at our disposal.
>> I was worried about hosting due to the amount of computing resources
>> required by the server (this is not a dedicated server). Is there an
>> installation guide for the server for linux?
>>
>> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
>> news:46900715.905@composent.com...
>>> Hi Kent,
>>>
>>> kent wrote:
>>>> Hi-ya,
>>>>
>>>> I am running an open source project called the bigblogzoo. In our
>>>> next release we are concentrating on the community aspect of the
>>>> application, and we would like to integrate ecf, therefore it would
>>>> be great if you could give us some pointers.
>>>>
>>>> Ideally we would like to do the following:
>>>> a) have a chat client
>>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>>> somehow messaging based, ie an encoded message is parsed on the
>>>> reciever's side which fires a message to open the tree to a certain
>>>> node.
>>>> c) be able to cobrowse. I can't seem to get this to work or find
>>>> documentation for this.
>>>> d) do all of this with out hosting an ecf server, ie be able to use
>>>> providers like google or yahoo
>>>>
>>>> Any tips on how to start would be grand.
>>>
>>> I think the best way for you to go, given 'd' is to use the ECF
>>> datashare API (for 'a', 'b' and 'c') for the data you wish to
>>> exchange (i.e. for b and c).
>>>
>>> 'a' is a little problematic, however, given 'd' (if you mean
>>> multiuser chat, rather than 1-1 chat). Google talk does not (yet)
>>> support XMPP multiuser chat (although I've heard rumors that they
>>> intend to), and the ECF yahoo provider does not (yet) implement the
>>> ECF chat APIs (we have an enhancement request for that here
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
>>> yourself to the cc to 'vote' for this bug)
>>>
>>> But in any event, you should be able to use the datashare API to
>>> exchange messages for the TreeViewer and to do URL co-browsing.
>>>
>>> The basic pattern for getting a datashare channel (a messaging
>>> channel for arbitrary data), is:
>>>
>>> // Get a container instance...somehow
>>> IContainer container = <get through some means...see below>
>>>
>>> // Get the IChannelContainerAdapter
>>> IChannelContainerAdapter channelContainerAdapter =
>>> (IChannelContainerAdapter)
>>> container.getAdapter(IChannelContainerAdapter.class);
>>>
>>> // Create a named channel ("mychannel") to use for your messaging
>>> IChannel channel =
>>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>>> null);
>>>
>>> // Use the channel.sendMessage() to send messages to channel, and
>>> //listener.handleChannelEvent to receive from to channel. Remember
>>> that // the thread that calls listener.handleChannelEvent(event) is
>>> unlikely
>>> // to be the UI thread, and it can be called at any time.
>>>
>>> Note that the datashare API is currently implemented by the XMPP
>>> provider, the skype provider, the ECF generic provider, and the JMS
>>> provider. We haven't yet had the chance to implement it with the
>>> Yahoo provider.
>>>
>>> Here are the Datashare API docs, with pointers to test code,
>>> javadocs, and source code:
>>> http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>>
>>> Now, you may be wondering...how do you get a hold of an IContainer
>>> instance (to start the above process)? There are essentially three
>>> ways...and which is desireable to you depends upon what kind/level of
>>> UI integration you want with the existing UI (some, none, full):
>>>
>>> 1) Query the IContainerManager. There is an OSGI service for ECF
>>> called IContainerManager. It provides access to all the
>>> previously-created IContainer instances. You access it in the normal
>>> way for OSGI services (e.g.)
>>>
>>> ServiceTracker tracker = new
>>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>>> tracker.open();
>>> IContainerManager manager = (IContainerManager) tracker.getService();
>>> IContainer [] containers = manager.getAllContainers();
>>> // look for container in containers[] that you are interested in
>>>
>>> 2) Create a new IContainer instance and connect it yourself. You
>>> would want to do this if you want to have users connect to an account
>>> that only shows your own user interface (rather than integrates with
>>> the existing roster view and/or chat UI). To create/connect an
>>> IContainer, use the ECF ContainerFactory:
>>>
>>> IContainer container =
>>> ContainerFactory.getDefault().createContainer("<type>");
>>>
>>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or
>>> "ecf.yahoo.jymsg" for yahoo.
>>>
>>> 3) Get an IContainer instance from the existing UI. For example, if
>>> the user connects to their google talk account, using the existing
>>> ECF UI, this will bring up the "Contacts" View. This view is
>>> implemented in org.eclipse.ecf.presence.ui/MultiRosterView class.
>>> With Eclipse 3.3 UI, it's possible to add UI to existing views (e.g.
>>> menu items, etc). From these additions, it's possible to access the
>>> selected roster elements (i.e. IRoster and IRosterEntrys), and get
>>> the IContainer from (e.g.) IRosterEntry (your buddy). So, for
>>> example, if the current selection is your buddy:
>>>
>>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>>
>>> IContainer container =
>>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>>
>>>
>>> This allows full integration with the MultiRosterView/Contacts
>>> view...if this is desired.
>>>
>>> There are two examples of doing this in the
>>> org.eclipse.ecf.presence.collab.ui plugin:
>>>
>>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>>
>>>
>>> This uses the org.eclipse.ui.menus.menuContribution extension point
>>> to add dynamic menu items to the
>>> org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also, see
>>> the URLShare and ViewShare classes in this plugin as examples of
>>> adding simple protocols for remote URL launching and remote View
>>> opening.
>>>
>>> Finally, I think that Marcelo Mayworm (an ECF committer) was going to
>>> do some work on modifying the Eclipse built-in browser so that it
>>> would allow automatic co-browsing rather than the user-initiated
>>> co-browsing that is there now. You may want to work together on
>>> this. And Kent if you can contribute back any of these applications
>>> to ECF, this would be most welcome.
>>>
>>> Thanks,
>>>
>>>
>>> Scott
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> Thanks.
>>>>
>>>> Kent
>>>>
>>>> ps you can find more info about the bigblogzoo here:
>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>>
>>>>
>>>>
>>>>
>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>
>
Re: General Tips [message #618823 is a reply to message #618821] Mon, 09 July 2007 19:21 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
thanks again, you gave us plenty to go on.

I am going to try and get the server up and runnning, then I will work on
the design of a cobrowsable TreeViewer. I forget to mention that most of the
nodes in the tree resolve to urls. Anyways like I said we would be very
happy to commit back anything useful.

cheers,

kent

"Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
news:469158A1.4030901@composent.com...
> Hi Kent,
>
> kent wrote:
>> Thanks for the details and links. We would be happy to contribute back
>> some application code.
>>
>> So it seems that if I want multi-user chat in the near future it might be
>> a good idea to host an ecf server (by the way I voted for the yahoo
>> issue).
>
> It need not be an ecf server. You could also run an XMPP server (and use
> xmpp multiuser chat).
> http://www.igniterealtime.org/projects/openfire/index.jsp
>
>>
>> I currently have a linux based virtual private server at our disposal. I
>> was worried about hosting due to the amount of computing resources
>> required by the server (this is not a dedicated server).
>
> The computing resources are not huge for the ecf generic server. See some
> data recently collected here:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193502
>
> But we haven't done much/any production-level tuning of the generic
> server.
>
> Another possibility is to use the JMS provider and some JMS-server.
>
>
> Is there an
>> installation guide for the server for linux?
>
> No...sorry about that. The (newly updated with support for Eclipse
> IApplication) applies pretty equally well to all environs where Equinox
> and Eclipse run.
>
> http://wiki.eclipse.org/ECF_Servers#Starting_an_ECF_Generic_ Server_as_Eclipse_Application_.28ECF_1.0.1_ETA:_7.2F13.2F200 7.29
>
> Scott
>
>
>>
>> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
>> news:46900715.905@composent.com...
>>> Hi Kent,
>>>
>>> kent wrote:
>>>> Hi-ya,
>>>>
>>>> I am running an open source project called the bigblogzoo. In our next
>>>> release we are concentrating on the community aspect of the
>>>> application, and we would like to integrate ecf, therefore it would be
>>>> great if you could give us some pointers.
>>>>
>>>> Ideally we would like to do the following:
>>>> a) have a chat client
>>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>>> somehow messaging based, ie an encoded message is parsed on the
>>>> reciever's side which fires a message to open the tree to a certain
>>>> node.
>>>> c) be able to cobrowse. I can't seem to get this to work or find
>>>> documentation for this.
>>>> d) do all of this with out hosting an ecf server, ie be able to use
>>>> providers like google or yahoo
>>>>
>>>> Any tips on how to start would be grand.
>>>
>>> I think the best way for you to go, given 'd' is to use the ECF
>>> datashare API (for 'a', 'b' and 'c') for the data you wish to exchange
>>> (i.e. for b and c).
>>>
>>> 'a' is a little problematic, however, given 'd' (if you mean multiuser
>>> chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
>>> multiuser chat (although I've heard rumors that they intend to), and the
>>> ECF yahoo provider does not (yet) implement the ECF chat APIs (we have
>>> an enhancement request for that here
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
>>> yourself to the cc to 'vote' for this bug)
>>>
>>> But in any event, you should be able to use the datashare API to
>>> exchange messages for the TreeViewer and to do URL co-browsing.
>>>
>>> The basic pattern for getting a datashare channel (a messaging channel
>>> for arbitrary data), is:
>>>
>>> // Get a container instance...somehow
>>> IContainer container = <get through some means...see below>
>>>
>>> // Get the IChannelContainerAdapter
>>> IChannelContainerAdapter channelContainerAdapter =
>>> (IChannelContainerAdapter)
>>> container.getAdapter(IChannelContainerAdapter.class);
>>>
>>> // Create a named channel ("mychannel") to use for your messaging
>>> IChannel channel =
>>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>>> null);
>>>
>>> // Use the channel.sendMessage() to send messages to channel, and
>>> //listener.handleChannelEvent to receive from to channel. Remember that
>>> // the thread that calls listener.handleChannelEvent(event) is unlikely
>>> // to be the UI thread, and it can be called at any time.
>>>
>>> Note that the datashare API is currently implemented by the XMPP
>>> provider, the skype provider, the ECF generic provider, and the JMS
>>> provider. We haven't yet had the chance to implement it with the Yahoo
>>> provider.
>>>
>>> Here are the Datashare API docs, with pointers to test code, javadocs,
>>> and source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>>
>>> Now, you may be wondering...how do you get a hold of an IContainer
>>> instance (to start the above process)? There are essentially three
>>> ways...and which is desireable to you depends upon what kind/level of UI
>>> integration you want with the existing UI (some, none, full):
>>>
>>> 1) Query the IContainerManager. There is an OSGI service for ECF called
>>> IContainerManager. It provides access to all the previously-created
>>> IContainer instances. You access it in the normal way for OSGI services
>>> (e.g.)
>>>
>>> ServiceTracker tracker = new
>>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>>> tracker.open();
>>> IContainerManager manager = (IContainerManager) tracker.getService();
>>> IContainer [] containers = manager.getAllContainers();
>>> // look for container in containers[] that you are interested in
>>>
>>> 2) Create a new IContainer instance and connect it yourself. You would
>>> want to do this if you want to have users connect to an account that
>>> only shows your own user interface (rather than integrates with the
>>> existing roster view and/or chat UI). To create/connect an IContainer,
>>> use the ECF ContainerFactory:
>>>
>>> IContainer container =
>>> ContainerFactory.getDefault().createContainer("<type>");
>>>
>>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or "ecf.yahoo.jymsg"
>>> for yahoo.
>>>
>>> 3) Get an IContainer instance from the existing UI. For example, if the
>>> user connects to their google talk account, using the existing ECF UI,
>>> this will bring up the "Contacts" View. This view is implemented in
>>> org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse 3.3 UI,
>>> it's possible to add UI to existing views (e.g. menu items, etc). From
>>> these additions, it's possible to access the selected roster elements
>>> (i.e. IRoster and IRosterEntrys), and get the IContainer from (e.g.)
>>> IRosterEntry (your buddy). So, for example, if the current selection is
>>> your buddy:
>>>
>>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>>
>>> IContainer container =
>>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>>
>>> This allows full integration with the MultiRosterView/Contacts view...if
>>> this is desired.
>>>
>>> There are two examples of doing this in the
>>> org.eclipse.ecf.presence.collab.ui plugin:
>>>
>>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>>
>>> This uses the org.eclipse.ui.menus.menuContribution extension point to
>>> add dynamic menu items to the
>>> org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also, see
>>> the URLShare and ViewShare classes in this plugin as examples of adding
>>> simple protocols for remote URL launching and remote View opening.
>>>
>>> Finally, I think that Marcelo Mayworm (an ECF committer) was going to do
>>> some work on modifying the Eclipse built-in browser so that it would
>>> allow automatic co-browsing rather than the user-initiated co-browsing
>>> that is there now. You may want to work together on this. And Kent if
>>> you can contribute back any of these applications to ECF, this would be
>>> most welcome.
>>>
>>> Thanks,
>>>
>>>
>>> Scott
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> Thanks.
>>>>
>>>> Kent
>>>>
>>>> ps you can find more info about the bigblogzoo here:
>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>>
>>>>
>>>>
>>>>
>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>
Re: General Tips [message #618824 is a reply to message #618823] Mon, 09 July 2007 20:17 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Kent,

Please keep us informed...to the extent you can...and depending upon how
it goes we'll look into adding in a future version.

Thanks!

Scott

kent wrote:
> thanks again, you gave us plenty to go on.
>
> I am going to try and get the server up and runnning, then I will work
> on the design of a cobrowsable TreeViewer. I forget to mention that most
> of the nodes in the tree resolve to urls. Anyways like I said we would
> be very happy to commit back anything useful.
>
> cheers,
>
> kent
>
> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
> news:469158A1.4030901@composent.com...
>> Hi Kent,
>>
>> kent wrote:
>>> Thanks for the details and links. We would be happy to contribute
>>> back some application code.
>>>
>>> So it seems that if I want multi-user chat in the near future it
>>> might be a good idea to host an ecf server (by the way I voted for
>>> the yahoo issue).
>>
>> It need not be an ecf server. You could also run an XMPP server (and
>> use xmpp multiuser chat).
>> http://www.igniterealtime.org/projects/openfire/index.jsp
>>
>>>
>>> I currently have a linux based virtual private server at our
>>> disposal. I was worried about hosting due to the amount of computing
>>> resources required by the server (this is not a dedicated server).
>>
>> The computing resources are not huge for the ecf generic server. See
>> some data recently collected here:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193502
>>
>> But we haven't done much/any production-level tuning of the generic
>> server.
>>
>> Another possibility is to use the JMS provider and some JMS-server.
>>
>>
>> Is there an
>>> installation guide for the server for linux?
>>
>> No...sorry about that. The (newly updated with support for Eclipse
>> IApplication) applies pretty equally well to all environs where
>> Equinox and Eclipse run.
>>
>> http://wiki.eclipse.org/ECF_Servers#Starting_an_ECF_Generic_ Server_as_Eclipse_Application_.28ECF_1.0.1_ETA:_7.2F13.2F200 7.29
>>
>>
>> Scott
>>
>>
>>>
>>> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
>>> news:46900715.905@composent.com...
>>>> Hi Kent,
>>>>
>>>> kent wrote:
>>>>> Hi-ya,
>>>>>
>>>>> I am running an open source project called the bigblogzoo. In our
>>>>> next release we are concentrating on the community aspect of the
>>>>> application, and we would like to integrate ecf, therefore it would
>>>>> be great if you could give us some pointers.
>>>>>
>>>>> Ideally we would like to do the following:
>>>>> a) have a chat client
>>>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>>>> somehow messaging based, ie an encoded message is parsed on the
>>>>> reciever's side which fires a message to open the tree to a certain
>>>>> node.
>>>>> c) be able to cobrowse. I can't seem to get this to work or find
>>>>> documentation for this.
>>>>> d) do all of this with out hosting an ecf server, ie be able to use
>>>>> providers like google or yahoo
>>>>>
>>>>> Any tips on how to start would be grand.
>>>>
>>>> I think the best way for you to go, given 'd' is to use the ECF
>>>> datashare API (for 'a', 'b' and 'c') for the data you wish to
>>>> exchange (i.e. for b and c).
>>>>
>>>> 'a' is a little problematic, however, given 'd' (if you mean
>>>> multiuser chat, rather than 1-1 chat). Google talk does not (yet)
>>>> support XMPP multiuser chat (although I've heard rumors that they
>>>> intend to), and the ECF yahoo provider does not (yet) implement the
>>>> ECF chat APIs (we have an enhancement request for that here
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
>>>> yourself to the cc to 'vote' for this bug)
>>>>
>>>> But in any event, you should be able to use the datashare API to
>>>> exchange messages for the TreeViewer and to do URL co-browsing.
>>>>
>>>> The basic pattern for getting a datashare channel (a messaging
>>>> channel for arbitrary data), is:
>>>>
>>>> // Get a container instance...somehow
>>>> IContainer container = <get through some means...see below>
>>>>
>>>> // Get the IChannelContainerAdapter
>>>> IChannelContainerAdapter channelContainerAdapter =
>>>> (IChannelContainerAdapter)
>>>> container.getAdapter(IChannelContainerAdapter.class);
>>>>
>>>> // Create a named channel ("mychannel") to use for your messaging
>>>> IChannel channel =
>>>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>>>> null);
>>>>
>>>> // Use the channel.sendMessage() to send messages to channel, and
>>>> //listener.handleChannelEvent to receive from to channel. Remember
>>>> that // the thread that calls listener.handleChannelEvent(event) is
>>>> unlikely
>>>> // to be the UI thread, and it can be called at any time.
>>>>
>>>> Note that the datashare API is currently implemented by the XMPP
>>>> provider, the skype provider, the ECF generic provider, and the JMS
>>>> provider. We haven't yet had the chance to implement it with the
>>>> Yahoo provider.
>>>>
>>>> Here are the Datashare API docs, with pointers to test code,
>>>> javadocs, and source code:
>>>> http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>>>
>>>> Now, you may be wondering...how do you get a hold of an IContainer
>>>> instance (to start the above process)? There are essentially three
>>>> ways...and which is desireable to you depends upon what kind/level
>>>> of UI integration you want with the existing UI (some, none, full):
>>>>
>>>> 1) Query the IContainerManager. There is an OSGI service for ECF
>>>> called IContainerManager. It provides access to all the
>>>> previously-created IContainer instances. You access it in the
>>>> normal way for OSGI services (e.g.)
>>>>
>>>> ServiceTracker tracker = new
>>>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>>>> tracker.open();
>>>> IContainerManager manager = (IContainerManager) tracker.getService();
>>>> IContainer [] containers = manager.getAllContainers();
>>>> // look for container in containers[] that you are interested in
>>>>
>>>> 2) Create a new IContainer instance and connect it yourself. You
>>>> would want to do this if you want to have users connect to an
>>>> account that only shows your own user interface (rather than
>>>> integrates with the existing roster view and/or chat UI). To
>>>> create/connect an IContainer, use the ECF ContainerFactory:
>>>>
>>>> IContainer container =
>>>> ContainerFactory.getDefault().createContainer("<type>");
>>>>
>>>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or
>>>> "ecf.yahoo.jymsg" for yahoo.
>>>>
>>>> 3) Get an IContainer instance from the existing UI. For example, if
>>>> the user connects to their google talk account, using the existing
>>>> ECF UI, this will bring up the "Contacts" View. This view is
>>>> implemented in org.eclipse.ecf.presence.ui/MultiRosterView class.
>>>> With Eclipse 3.3 UI, it's possible to add UI to existing views (e.g.
>>>> menu items, etc). From these additions, it's possible to access the
>>>> selected roster elements (i.e. IRoster and IRosterEntrys), and get
>>>> the IContainer from (e.g.) IRosterEntry (your buddy). So, for
>>>> example, if the current selection is your buddy:
>>>>
>>>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>>>
>>>> IContainer container =
>>>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>>>
>>>>
>>>> This allows full integration with the MultiRosterView/Contacts
>>>> view...if this is desired.
>>>>
>>>> There are two examples of doing this in the
>>>> org.eclipse.ecf.presence.collab.ui plugin:
>>>>
>>>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>>>
>>>>
>>>> This uses the org.eclipse.ui.menus.menuContribution extension point
>>>> to add dynamic menu items to the
>>>> org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also,
>>>> see the URLShare and ViewShare classes in this plugin as examples of
>>>> adding simple protocols for remote URL launching and remote View
>>>> opening.
>>>>
>>>> Finally, I think that Marcelo Mayworm (an ECF committer) was going
>>>> to do some work on modifying the Eclipse built-in browser so that it
>>>> would allow automatic co-browsing rather than the user-initiated
>>>> co-browsing that is there now. You may want to work together on
>>>> this. And Kent if you can contribute back any of these applications
>>>> to ECF, this would be most welcome.
>>>>
>>>> Thanks,
>>>>
>>>>
>>>> Scott
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Kent
>>>>>
>>>>> ps you can find more info about the bigblogzoo here:
>>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>
>
Re: General Tips [message #618825 is a reply to message #618824] Mon, 09 July 2007 20:57 Go to previous message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
will do!
"Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
news:469297E6.2010202@composent.com...
> Hi Kent,
>
> Please keep us informed...to the extent you can...and depending upon how
> it goes we'll look into adding in a future version.
>
> Thanks!
>
> Scott
>
> kent wrote:
>> thanks again, you gave us plenty to go on.
>>
>> I am going to try and get the server up and runnning, then I will work on
>> the design of a cobrowsable TreeViewer. I forget to mention that most of
>> the nodes in the tree resolve to urls. Anyways like I said we would be
>> very happy to commit back anything useful.
>>
>> cheers,
>>
>> kent
>>
>> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
>> news:469158A1.4030901@composent.com...
>>> Hi Kent,
>>>
>>> kent wrote:
>>>> Thanks for the details and links. We would be happy to contribute back
>>>> some application code.
>>>>
>>>> So it seems that if I want multi-user chat in the near future it might
>>>> be a good idea to host an ecf server (by the way I voted for the yahoo
>>>> issue).
>>>
>>> It need not be an ecf server. You could also run an XMPP server (and
>>> use xmpp multiuser chat).
>>> http://www.igniterealtime.org/projects/openfire/index.jsp
>>>
>>>>
>>>> I currently have a linux based virtual private server at our disposal.
>>>> I was worried about hosting due to the amount of computing resources
>>>> required by the server (this is not a dedicated server).
>>>
>>> The computing resources are not huge for the ecf generic server. See
>>> some data recently collected here:
>>>
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=193502
>>>
>>> But we haven't done much/any production-level tuning of the generic
>>> server.
>>>
>>> Another possibility is to use the JMS provider and some JMS-server.
>>>
>>>
>>> Is there an
>>>> installation guide for the server for linux?
>>>
>>> No...sorry about that. The (newly updated with support for Eclipse
>>> IApplication) applies pretty equally well to all environs where Equinox
>>> and Eclipse run.
>>>
>>> http://wiki.eclipse.org/ECF_Servers#Starting_an_ECF_Generic_ Server_as_Eclipse_Application_.28ECF_1.0.1_ETA:_7.2F13.2F200 7.29
>>>
>>> Scott
>>>
>>>
>>>>
>>>> "Scott Lewis" <slewis@composent.com> schrieb im Newsbeitrag
>>>> news:46900715.905@composent.com...
>>>>> Hi Kent,
>>>>>
>>>>> kent wrote:
>>>>>> Hi-ya,
>>>>>>
>>>>>> I am running an open source project called the bigblogzoo. In our
>>>>>> next release we are concentrating on the community aspect of the
>>>>>> application, and we would like to integrate ecf, therefore it would
>>>>>> be great if you could give us some pointers.
>>>>>>
>>>>>> Ideally we would like to do the following:
>>>>>> a) have a chat client
>>>>>> b) be able to share a View ie a TreeViewer. This sharing could be
>>>>>> somehow messaging based, ie an encoded message is parsed on the
>>>>>> reciever's side which fires a message to open the tree to a certain
>>>>>> node.
>>>>>> c) be able to cobrowse. I can't seem to get this to work or find
>>>>>> documentation for this.
>>>>>> d) do all of this with out hosting an ecf server, ie be able to use
>>>>>> providers like google or yahoo
>>>>>>
>>>>>> Any tips on how to start would be grand.
>>>>>
>>>>> I think the best way for you to go, given 'd' is to use the ECF
>>>>> datashare API (for 'a', 'b' and 'c') for the data you wish to exchange
>>>>> (i.e. for b and c).
>>>>>
>>>>> 'a' is a little problematic, however, given 'd' (if you mean multiuser
>>>>> chat, rather than 1-1 chat). Google talk does not (yet) support XMPP
>>>>> multiuser chat (although I've heard rumors that they intend to), and
>>>>> the ECF yahoo provider does not (yet) implement the ECF chat APIs (we
>>>>> have an enhancement request for that here
>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=146955 please add
>>>>> yourself to the cc to 'vote' for this bug)
>>>>>
>>>>> But in any event, you should be able to use the datashare API to
>>>>> exchange messages for the TreeViewer and to do URL co-browsing.
>>>>>
>>>>> The basic pattern for getting a datashare channel (a messaging channel
>>>>> for arbitrary data), is:
>>>>>
>>>>> // Get a container instance...somehow
>>>>> IContainer container = <get through some means...see below>
>>>>>
>>>>> // Get the IChannelContainerAdapter
>>>>> IChannelContainerAdapter channelContainerAdapter =
>>>>> (IChannelContainerAdapter)
>>>>> container.getAdapter(IChannelContainerAdapter.class);
>>>>>
>>>>> // Create a named channel ("mychannel") to use for your messaging
>>>>> IChannel channel =
>>>>> channelContainerAdapter.createChannel(IDFactory.getDefault() .createStringID( "mychannel"),listener,
>>>>> null);
>>>>>
>>>>> // Use the channel.sendMessage() to send messages to channel, and
>>>>> //listener.handleChannelEvent to receive from to channel. Remember
>>>>> that // the thread that calls listener.handleChannelEvent(event) is
>>>>> unlikely
>>>>> // to be the UI thread, and it can be called at any time.
>>>>>
>>>>> Note that the datashare API is currently implemented by the XMPP
>>>>> provider, the skype provider, the ECF generic provider, and the JMS
>>>>> provider. We haven't yet had the chance to implement it with the
>>>>> Yahoo provider.
>>>>>
>>>>> Here are the Datashare API docs, with pointers to test code, javadocs,
>>>>> and source code: http://wiki.eclipse.org/ECF_API_Docs#Datashare_API
>>>>>
>>>>> Now, you may be wondering...how do you get a hold of an IContainer
>>>>> instance (to start the above process)? There are essentially three
>>>>> ways...and which is desireable to you depends upon what kind/level of
>>>>> UI integration you want with the existing UI (some, none, full):
>>>>>
>>>>> 1) Query the IContainerManager. There is an OSGI service for ECF
>>>>> called IContainerManager. It provides access to all the
>>>>> previously-created IContainer instances. You access it in the normal
>>>>> way for OSGI services (e.g.)
>>>>>
>>>>> ServiceTracker tracker = new
>>>>> ServiceTracker(bundleContext,IContainerManager.class.getName (),null);
>>>>> tracker.open();
>>>>> IContainerManager manager = (IContainerManager) tracker.getService();
>>>>> IContainer [] containers = manager.getAllContainers();
>>>>> // look for container in containers[] that you are interested in
>>>>>
>>>>> 2) Create a new IContainer instance and connect it yourself. You
>>>>> would want to do this if you want to have users connect to an account
>>>>> that only shows your own user interface (rather than integrates with
>>>>> the existing roster view and/or chat UI). To create/connect an
>>>>> IContainer, use the ECF ContainerFactory:
>>>>>
>>>>> IContainer container =
>>>>> ContainerFactory.getDefault().createContainer("<type>");
>>>>>
>>>>> where <type> is "ecf.xmpp.smack" (XMPP/Google Talk) or
>>>>> "ecf.yahoo.jymsg" for yahoo.
>>>>>
>>>>> 3) Get an IContainer instance from the existing UI. For example, if
>>>>> the user connects to their google talk account, using the existing ECF
>>>>> UI, this will bring up the "Contacts" View. This view is implemented
>>>>> in org.eclipse.ecf.presence.ui/MultiRosterView class. With Eclipse
>>>>> 3.3 UI, it's possible to add UI to existing views (e.g. menu items,
>>>>> etc). From these additions, it's possible to access the selected
>>>>> roster elements (i.e. IRoster and IRosterEntrys), and get the
>>>>> IContainer from (e.g.) IRosterEntry (your buddy). So, for example, if
>>>>> the current selection is your buddy:
>>>>>
>>>>> IRosterEntry rosterEntry = (IRosterEntry) getSelection();
>>>>>
>>>>> IContainer container =
>>>>> rosterEntry.getRoster().getPresenceContainerAdapter().getAda pter(IContainer.class);
>>>>>
>>>>> This allows full integration with the MultiRosterView/Contacts
>>>>> view...if this is desired.
>>>>>
>>>>> There are two examples of doing this in the
>>>>> org.eclipse.ecf.presence.collab.ui plugin:
>>>>>
>>>>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecf/plu gins/org.eclipse.ecf.presence.collab.ui/?root=Technology_Pro ject
>>>>>
>>>>> This uses the org.eclipse.ui.menus.menuContribution extension point to
>>>>> add dynamic menu items to the
>>>>> org.eclipse.ecf.presence.ui.MultiRosterView context menus. Also, see
>>>>> the URLShare and ViewShare classes in this plugin as examples of
>>>>> adding simple protocols for remote URL launching and remote View
>>>>> opening.
>>>>>
>>>>> Finally, I think that Marcelo Mayworm (an ECF committer) was going to
>>>>> do some work on modifying the Eclipse built-in browser so that it
>>>>> would allow automatic co-browsing rather than the user-initiated
>>>>> co-browsing that is there now. You may want to work together on this.
>>>>> And Kent if you can contribute back any of these applications to ECF,
>>>>> this would be most welcome.
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>> Scott
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Kent
>>>>>>
>>>>>> ps you can find more info about the bigblogzoo here:
>>>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://www.bigblogzoo.com/forum/topic.php?id=12&page& ;replies=4#post-20
>>>>
>>
Previous Topic:Can't login to: ##wicket@irc.freenode.net
Next Topic:ECF Webinar
Goto Forum:
  


Current Time: Fri Apr 19 21:45:01 GMT 2024

Powered by FUDForum. Page generated in 0.03872 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top