class TcpListener extends Actor with Timers
TcpListener Actor implementation. Not useful for an API consumer. See documentation at companion object to create TcpListeners.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- TcpListener
- Timers
- Actor
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new TcpListener()
Type Members
-
type
Receive = PartialFunction[Any, Unit]
- Definition Classes
- Actor
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def acceptConnection(key: SelectionKey): Unit
- def acceptIncomingConnections: Unit
-
def
aroundPostRestart(reason: Throwable): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundPostStop(): Unit
- Attributes
- protected[akka]
- Definition Classes
- Timers → Actor
-
def
aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
- Attributes
- protected[akka]
- Definition Classes
- Timers → Actor
-
def
aroundPreStart(): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit
- Attributes
- protected[akka]
- Definition Classes
- Timers → Actor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
implicit
val
context: ActorContext
- Definition Classes
- Actor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getListenerAddress: String
- def getListenerPort: Int
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initServerSocket(port: Integer): Unit
- def initServerSocketDo(port: Integer): Unit
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var masterActor: Option[ActorRef]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val onConnectionNewSubscribers: ListBuffer[ActorRef]
- def pollForIncomingConnections(socketSelector: Selector): Boolean
-
def
postRestart(reason: Throwable): Unit
- Definition Classes
- Actor
- Annotations
- @throws( classOf[java.lang.Exception] )
-
def
postStop(): Unit
- Definition Classes
- TcpListener → Actor
-
def
preRestart(reason: Throwable, message: Option[Any]): Unit
- Definition Classes
- Actor
- Annotations
- @throws( classOf[java.lang.Exception] )
-
def
preStart(): Unit
- Definition Classes
- Actor
- Annotations
- @throws( classOf[java.lang.Exception] )
- def programTimer: Unit
-
def
receive: PartialFunction[Any, Unit]
- Definition Classes
- TcpListener → Actor
-
implicit final
val
self: ActorRef
- Definition Classes
- Actor
-
final
def
sender(): ActorRef
- Definition Classes
- Actor
- var serverSocketChannel: Option[ServerSocketChannel]
- var socketSelector: Option[Selector]
- def stopListener: Unit
-
def
supervisorStrategy: SupervisorStrategy
- Definition Classes
- Actor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
timers: TimerScheduler
- Definition Classes
- Timers
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unhandled(message: Any): Unit
- Definition Classes
- Actor
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
Akka Actors to build Reactive TCP servers using Akka Actors
Homepage: http://www.aspl.es/ronda
Mailing list: http://lists.aspl.es/cgi-bin/mailman/listinfo/rondabridge
Overview
RondaBridge is a set of Akka Actors, written in Scala, that provides support to create TcpListeners and TcpConnections.
Even though creating TcpClient software is supported, RondaBridge is more targeted to server side development for safe, scalable, concurrent and reactive TCP servers on top of Akka Actors system.
RondaBridge aims to provide full support to create TcpListeners, including support for TLS, TLS SNI, multi-tenant configuration, and WebSocket.
RondaBridge is OpenSource, released under the LGPL 2.1 is checked with an intense regression test that is expanded as much as we can. It is written using ScalaTest.
We are using RondaBridge to provide Tcp support for MyQtt (https://www.aspl.es/myqtt).
How to include RondaBridge
Include the following into your build.sbt:
Or, download it from github and do a local install:
>> git clone git://github.com/ASPLes/RondaBridge.gite >> cd RondaBridge >> sbt > compile > publishLocal
...and then include/import RondaBridge from your proyect as indicated above.
How to create a TcpListener
How to get notifications for new incoming connections
The actor that created the TcpListener, which is the master actor by that step, will get ronda.tcp.Api.NewConnection notification:
As you can see, a ronda.tcp.Api.NewConnection message along with new connection is received everytime a new incoming connection is received.
Next steps
Once created a TcpListener or a TcpConnection, use Api messages available to interact with these actors, to configure them and to make them do the useful work.