get the stream id

2 views
Skip to first unread message

ckemmler

unread,
Sep 8, 2010, 1:05:44 PM9/8/10
to emite
Hi,

I'm trying to upgrade onesocialweb to use emite 0.5 and my only
problem is that I can't figure out how to get the stream ID from the
session. AFAIK, it used to be session.getId() or something similar,
but that doesn't work anymore.

Is there any new way to do this?

Thanks in advance,

Candide

dani

unread,
Sep 8, 2010, 2:02:37 PM9/8/10
to em...@googlegroups.com
Hello Candide:

Emite received a lot of refactoring lately. Most notably we moved from
our home-made IoC solution (Suco) to the much better and widely used
gin library. Some API changed and new event system was introduced. I
just upload a 0.6.0 Release Candidate version (in the Downloads tabs)
compatible (I hope) with the previous version and with lot of
deprecation warning in order to help with the new API (some import
organization requiered in some classes). Notice that with this version
Suco library is not longer needed, and you need gin instead. I
recommend to use this version instead of 0.5 version (lot of bug fixes
and new functionallity was added).

In the source (also included in the jar) there are some examples of use.

With this new version the way to get the stream id is using the method
getStreamSettings from the XmppConnection class... If you're using
that id to implement pause/resume notice that this functionallity is
already implemented in 0.6 version.

Don't hesitate to ask any question if you have any trouble with the upgrade.

Saludos
Dani

> --
> You received this message because you are subscribed to the Google Groups "emite" group.
> To post to this group, send email to em...@googlegroups.com.
> To unsubscribe from this group, send email to emite+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/emite?hl=en.
>
>

ckemmler

unread,
Sep 10, 2010, 4:14:11 AM9/10/10
to emite
Hey dani,

I tried to do the upgrade. I figured out a lot, but now I'm stuck with
those few lines which really I don't know what to make of:

RosterImpl rosterImpl = new RosterImpl(session);
roster = new GwtRoster(rosterImpl);
presenceManager = new PresenceManagerImpl(session, rosterImpl);
session.login(XmppURI.uri(username + "@" + domain), password);

Can you please give me a hand and tell me how to do this using the new
API?

Thanks very much in advance,

Candide

On 8 sep, 20:02, dani <dan...@gmail.com> wrote:
> Hello Candide:
>
> Emite received a lot of refactoring lately. Most notably we moved from
> our home-made IoC solution (Suco) to the much better and widely used
> gin library. Some API changed and new event system was introduced. I
> just upload a 0.6.0 Release Candidate version (in the Downloads tabs)
> compatible (I hope) with the previous version and with lot of
> deprecation warning in order to help with the new API (some import
> organization requiered in some classes). Notice that with this version
> Suco library is not longer needed, and you need gin instead. I
> recommend to use this version instead of 0.5 version (lot of bug fixes
> and new functionallity was added).
>
> In the source (also included in the jar) there are some examples of use.
>
> With this new version the way to get the stream id is using the method
> getStreamSettings from the XmppConnection class... If you're using
> that id to implement pause/resume notice that this functionallity is
> already implemented in 0.6 version.
>
> Don't hesitate to ask any question if you have any trouble with the upgrade.
>
> Saludos
> Dani
>

dani

unread,
Sep 10, 2010, 4:33:12 AM9/10/10
to em...@googlegroups.com, ckem...@gmail.com
Hello Candide:

Sorry, I missed your last email: 


The general idea is that you never have to create any object. Instead you use gin (using a ginjector) to retrieve the things you need (this is a good starting point: http://code.google.com/p/google-gin/wiki/GinTutorial). There are lot of resources in internet talking about IoC. 

First you need to declare what are you going to use:

// this declares that MyApp is going to use core, instant messaging, multi-user-chat (rooms), and browser configuration
public interface MyAppGinjector extends CoreGinjector, ImGinjector, MucGinjector, BrowserGinjector {
}

Then, in your entry point, you have to create a ginjector and ask him for the stuff:

MyAppGinjector ginjector = GWT.create(MyAppGinjector.class);
XmppSession session = ginjector.getXmppSession();
session.login(XmppURI.uri("myself@domain"));

Everything you need, you ask the ginjector:

PresenceManager manager = ginjector.getPresenceManager();
ChatManager chats = ginjector.getChatManager();
RoomManager rooms = ginjector.getRoomManager();

The other (and best) option is to use constructor injector. I will write a guide about that soon, but I recommend you to take a look to the examples:

I hope it helps!

ckemmler

unread,
Sep 10, 2010, 6:59:41 PM9/10/10
to emite
Hey Dani,

That's great: I just did the upgrade.
Is it possible that performance has improved sensibly?

Thanks & keep up the good work!

On Sep 10, 10:33 am, dani <dan...@gmail.com> wrote:
> Hello Candide:
>
> Sorry, I missed your last email:
>
> The general idea is that you never have to create any object. Instead you
> use gin (using a ginjector) to retrieve the things you need (this is a good
> starting point:http://code.google.com/p/google-gin/wiki/GinTutorial). There
> are lot of resources in internet talking about IoC.
>
> First you need to declare what are you going to use:
>
> // this declares that MyApp is going to use core, instant messaging,
> multi-user-chat (rooms), and browser configuration
> public interface MyAppGinjector extends CoreGinjector, ImGinjector,
> MucGinjector, BrowserGinjector {
>
> }
>
> Then, in your entry point, you have to create a ginjector and ask him for
> the stuff:
>
> MyAppGinjector ginjector = GWT.create(MyAppGinjector.class);
> XmppSession session = ginjector.getXmppSession();
> session.login(XmppURI.uri("myself@domain"));
>
> Everything you need, you ask the ginjector:
>
> PresenceManager manager = ginjector.getPresenceManager();
> ChatManager chats = ginjector.getChatManager();
> RoomManager rooms = ginjector.getRoomManager();
>
> The other (and best) option is to use constructor injector. I will write a
> guide about that soon, but I recommend you to take a look to the examples:http://code.google.com/p/emite/source/browse/#svn/trunk/emite-lib/src...http://code.google.com/p/emite/source/browse/#svn/trunk/emite-lib/src...http://code.google.com/p/emite/source/browse/#svn/trunk/emite-lib/src...
>
> I hope it helps!
> > emite+un...@googlegroups.com <emite%2Bunsu...@googlegroups.com>.
> > > > For more options, visit this group athttp://
> > groups.google.com/group/emite?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "emite" group.
> > To post to this group, send email to em...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > emite+un...@googlegroups.com <emite%2Bunsu...@googlegroups.com>.

Candide Kemmler

unread,
Sep 8, 2010, 4:34:23 PM9/8/10
to dani, em...@googlegroups.com
Hi Dani,

I'm giving it a try tonight after all, but I'm having a bit of a difficult time, in the absence of proper documentation.

Here are the two lines (of old code) that I don't know what to make of:

RosterImpl rosterImpl = new RosterImpl(session);

presenceManager = new PresenceManagerImpl(session, rosterImpl);

care to give me a hand with these, i.e. tell me what is the appropriate replacement of these when using the new library?

Thanks in advance,

Candide

On 08 Sep 2010, at 20:07, dani wrote:

dani

unread,
Sep 13, 2010, 5:32:06 PM9/13/10
to em...@googlegroups.com

Hello:

On Sat, Sep 11, 2010 at 00:59, ckemmler <ckem...@gmail.com> wrote:
Hey Dani,

That's great: I just did the upgrade.

Nice! Can you explain the problems you found, in order to write an unpdate guide?
 
Is it possible that performance has improved sensibly?

I hope so!! :) Glad to hear it

 

Thanks & keep up the good work!
Thanks!

 
To unsubscribe from this group, send email to emite+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages