Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventBus requires org.vertx.java.core.eventbus.EventBus? #48

Closed
angeloh opened this issue Sep 2, 2013 · 9 comments
Closed

EventBus requires org.vertx.java.core.eventbus.EventBus? #48

angeloh opened this issue Sep 2, 2013 · 9 comments

Comments

@angeloh
Copy link
Contributor

angeloh commented Sep 2, 2013

found : org.vertx.scala.core.eventbus.EventBus
required: org.vertx.java.core.eventbus.EventBus

lazy val eb = EventBus(vertx.eventBus)

I think it should requires scala one.

@raniejade
Copy link
Contributor

It's for internal use.

@angeloh
Copy link
Contributor Author

angeloh commented Sep 2, 2013

do you mean I can't use it at my test case?

@raniejade
Copy link
Contributor

I don't think doing this is necessary.

lazy val eb = EventBus(vertx.eventBus)

because vertx.eventBus is of type org.vertx.scala.core.eventbus.EventBus.

@normanmaurer
Copy link
Member

If its for internal usage you may want to have a package private constructor ?

Am 02.09.2013 um 10:18 schrieb Ranie Jade Ramiso notifications@github.com:

It's for internal use.


Reply to this email directly or view it on GitHub.

@raniejade
Copy link
Contributor

@normanmaurer I think so too. The user does not need to worry about creating an EventBus object.

@angeloh
Copy link
Contributor Author

angeloh commented Sep 2, 2013

@raniejade No, vertx is of type org.vertx.java.core.eventbus.EventBus by default.
Here is my example.

  class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
      lazy val sVertx: Vertx = Vertx(getVertx)
      lazy val eb = EventBus(vertx.eventBus)

Because TestVerticle is from testtools, getVertx or vertx returns java's vertx.

@raniejade
Copy link
Contributor

found : org.vertx.scala.core.eventbus.EventBus
required: org.vertx.java.core.eventbus.EventBus
lazy val eb = EventBus(vertx.eventBus)
I think it should requires scala one.

Your first post is saying otherwise.

On Tue, Sep 3, 2013 at 12:01 AM, Angelo H notifications@github.com wrote:

@raniejade https://github.com/raniejade No vertx is of type
org.vertx.java.core.eventbus.EventBus by default.
Here is my example.

class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
lazy val sVertx: Vertx = Vertx(getVertx)

lazy val eb = EventBus(vertx.eventBus)

Because TestVerticle is from testtools, getVertx or vertx returns java's
vertx.


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-23668063
.

Ranie Jade Ramiso
Software Engineer | Open Source Enthusiast | Professional Slacker
Philippines

w: raniejaderamiso.com
e: raniejaderamiso@gmail.com

@angeloh
Copy link
Contributor Author

angeloh commented Sep 2, 2013

From https://github.com/vert-x/mod-lang-scala/blob/master/src/main/scala/org/vertx/scala/core/eventbus/EventBus.scala,

EventBus is accepting org.vertx.java.core.eventbus.EventBus, not scala's. That's why I create this bug. But if this is for internal use, there is no point to change it. I thought this line "val eb = EventBus(vertx.eventBus)" is required for every test case.

But since there is no scala version's TestVerticle, how can I get scala version's EventBus in my test case?

  class SockJSVerticleTest extends TestVerticle with EventBusTestBase {
    lazy val sVertx: Vertx = Vertx(getVertx)
    lazy val eb = EventBus(vertx.eventBus)
  }

@raniejade
Copy link
Contributor

The constructor is for internal use, that's why it's accepting o.v.j.c.e.EventBus instead of the scala one.

This should do it, sorry did not understand you at first 😄

lazy val eb = EventBus(vertx.eventBus)

@angeloh angeloh closed this as completed Sep 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants