I am building a system on akka/play framework with java. I need to build an actor who does a SSH connection to an external system & maintain the session for the span of user interaction..
I found Java JCraft/JSch library that supports java SSH connectivity
Jsch channels support writing to a given OutputStream
channel.setOutputStream(stream)
As the solution what I did was to write a custom OutputStream that on write(buffer)
pass the buffer contents to a given actor via actorRef.tell(buffer, ActorRef.noSender());
thus eliminating the need for a external thread.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.