[akka-user] Re: akka streams 1.0 and http routing - in java

2015-08-11 Thread Johannes Rudolph
Hi paweł, you are on the right track. You need to provide the data as a `Source`. Then, you can create a response like this: Source data = ... HttpResponse response = HttpResponse.create().withEntity(HttpEntities.createChunked(contentType, data)); If you know the length of the data (i.e. the

[akka-user] Re: akka-http 1.0 RC and SSL and Java

2015-08-11 Thread akkanex
Ehm, nobody? Am Montag, 10. August 2015 16:11:45 UTC+2 schrieb akk...@gmail.com: > > I try to created a REST server with akka-http / SSL / Java. > > I'm a little bit stuck with the SSL part as following article doesn't > provide too much information: > http://doc.akka.io/docs/akka-stream-and-htt

[akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread Johannes Rudolph
Hi john, it seems that this is a bug that we thought to be fixed but which has reappeared. I filed it as https://github.com/akka/akka/issues/18178 Johannes On Tuesday, August 11, 2015 at 7:08:44 AM UTC+2, john@gmail.com wrote: > > Ok I realized that it is in the release-2.3-dev branch. > >

[akka-user] Re: akka streams 1.0 and http routing - in java

2015-08-11 Thread paweł kamiński
ah :] thanks, I guess my bad was that I tried to use Source and it wasnt accepted... and I was blind :)) On Tuesday, 11 August 2015 09:44:15 UTC+2, Johannes Rudolph wrote: > > Hi paweł, > > you are on the right track. You need to provide the data as a > `Source`. Then, you can create a resp

[akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread john . vieten
thanx for replying!. ha I managed to compile myself a 2.11 version! no problem. Am Dienstag, 11. August 2015 09:49:29 UTC+2 schrieb Johannes Rudolph: > > Hi john, > > it seems that this is a bug that we thought to be fixed but which has > reappeared. I filed it as https://github.com/akka/akka/i

[akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread john . vieten
I am using Akka http Test HttpRequest request = ... TestResponse response = appRoute.run(request); Unfortunatly TestResponse is null. I think its because I am getting the error No such instance method: 'akka.http.scaladsl.util.FastFuture' Did I compile wrongly? Am Dienstag, 11. August 2015

[akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread john . vieten
I am using Akka http Test HttpRequest request = ... TestResponse response = appRoute.run(request); Unfortunatly TestResponse is null. I think its because I am getting the error No such instance method: 'akka.http.scaladsl.util.FastFuture' Did I compile wrongly? Am Dienstag, 11. August 201

Re: [akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread 'Johannes Rudolph' via Akka User List
Hi John, how can we know? You need to share more of your code :) Johannes On Tue, Aug 11, 2015 at 11:01 AM, wrote: > I am using Akka http Test > > HttpRequest request = ... > TestResponse response = appRoute.run(request); > > Unfortunatly TestResponse is null. > I think its because I am gettin

[akka-user] Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-11 Thread john . vieten
I am extending akka.http.javadsl.testkit.RouteTest. In one of the methods I need to return a TestResponse. How can I do this with java public TestResponse createTestResponse(HttpResponse response) { return new TestResponse(response,null,null,null); } does not work? -- >>

[akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-11 Thread john . vieten
ok I found out: return new TestResponse(response,null,null,null){ public scala.runtime.Nothing$ fail( String message) { return null;} public void assertEquals(int expected, int actual, String message) { } public void assertEquals(Object expected, Object actual, String message

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-11 Thread David Pinn
Lance, I'm so grateful for your help in solving this problem. You've changed the way I was looking at it, and now you've provided code that illustrates your solution. I am working through it carefully now. I'm really looking forward to seeing how it fits into the application that we're building

Re: [akka-user] Re: Can't find akka.http.javadsl.testkit.JUnitRouteTest?

2015-08-11 Thread john . vieten
Sorry I found the error so I don't need to post the code. When do you think (just roughly) will typesafe publish an updated artificat to maven central? Am Dienstag, 11. August 2015 11:05:50 UTC+2 schrieb Johannes Rudolph: > > Hi John, > > how can we know? You need to share more of your code :)

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-11 Thread David Pinn
Lance, I've been translating your autoRefresh method into Java. Kill. Me. Now. You wrote this: val auto = Sink( Flow[(RefreshToken, Promise[AccessToken])], Merge[(RefreshToken, Promise[AccessToken])](2), request, Unzip[RefreshToken, Promise[AccessToken]], Zip[Fut

Re: [akka-user] Actors without side effects (var-decl)

2015-08-11 Thread Richard Rodseth
I sometimes use a single var containing an immutable model. Remember that you don't have to worry about synchronization and locks, so multiple vars may not be the end of the world. I also use the become(state) technique. Also look into the FSM trait. http://doc.akka.io/docs/akka/snapshot/scala/fsm.

[akka-user] Monitor system for Akka cluster

2015-08-11 Thread Yifei
t's very difficult to keep track of the states of all actors in Akka cluster. I've been searching around the internet for a good system for monitoring Akka cluster system. However, the results were most likely systems to monitor JVM stats. I am curious if there is a system I can use to monito

[akka-user] Transforming elements of a stream more than ones inside a flow

2015-08-11 Thread wwagner4
I cannot find a solution for accessing the elements of a stream more than ones inside a flow without buffering the complete stream. To illustrate the problem I created the following example: def randomIntegersSource(size: Int): Source[Int, _] = { val iter = Iterator.continually(ThreadLocalR