abstract class ProtocolImpl extends Protocol with ProtocolUtils
Core class for implementing a reactive protocol.
This provides the basic functionality for implementing reactive protocols. It is designed to be used in conjunction with Sending and Receiving. It is more convenient to extends the class ReactiveProtocol which has most relevant traits mixed-in.
- Alphabetic
- By Inheritance
- ProtocolImpl
- ProtocolUtils
- Protocol
- NamedEntity
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ProtocolImpl(config: ProcessConfig, nickname: String = "unnamed")
- config
configuration from the process to which the protocol instance is attached
- nickname
nickname of the protocol (aimed to be used for io)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to any2stringadd[ProtocolImpl] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
-->(sender: Sender): Unit
Connects a new sender to this protocol.
Connects a new sender to this protocol.
- sender
the new sender to connect.
- Definition Classes
- ProtocolUtils
-
def
->[B](y: B): (ProtocolImpl, B)
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to ArrowAssoc[ProtocolImpl] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
lazy val
ALL: Set[PID]
set of all processes in the system.
set of all processes in the system.
- Attributes
- protected[this]
- Definition Classes
- ProtocolUtils
-
lazy val
N: Int
total number of processes running in the system.
total number of processes running in the system.
- Attributes
- protected[this]
- Definition Classes
- ProtocolUtils
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
context: Some[PID]
- Definition Classes
- Protocol → NamedEntity
-
def
dispatcher: Dispatcher
dispatcher to be used when delivering messages.
dispatcher to be used when delivering messages. Typically, this is the default dispatcher of the process.
- returns
dispatcher for message delivery
-
def
ensuring(cond: (ProtocolImpl) ⇒ Boolean, msg: ⇒ Any): ProtocolImpl
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to Ensuring[ProtocolImpl] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ProtocolImpl) ⇒ Boolean): ProtocolImpl
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to Ensuring[ProtocolImpl] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ProtocolImpl
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to Ensuring[ProtocolImpl] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ProtocolImpl
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to Ensuring[ProtocolImpl] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def eventTracer: EventTracer
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to StringFormat[ProtocolImpl] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
id: ProtoID
identifier of the protocol.
identifier of the protocol.
- returns
identifier of the protocol
- Definition Classes
- ProtocolImpl → Protocol
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
me: PID
identifier of the process in which the protocol is running.
identifier of the process in which the protocol is running.
- Attributes
- protected[this]
- Definition Classes
- ProtocolUtils
-
def
name: String
returns the name of the protocol
returns the name of the protocol
- returns
name of the protocol
- Definition Classes
- Protocol → NamedEntity
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
lazy val
neighbors: Set[PID]
set of processes that are direct neighbors to the process in which this instance of the protocol runs.
set of processes that are direct neighbors to the process in which this instance of the protocol runs.
- Attributes
- protected[this]
- Definition Classes
- ProtocolUtils
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
onError(e: Throwable): Unit
override this method to report on errors whens the protocol is forcibly terminated due to an an error or exception.
override this method to report on errors whens the protocol is forcibly terminated due to an an error or exception. The method should never use any of the communication methods such as send, receive, or deliver.
- Definition Classes
- Protocol
-
def
onFinish(): Unit
override this method to perform take downs just after this process has finished.
override this method to perform take downs just after this process has finished.
- Definition Classes
- Protocol
-
def
onShutdown(): Unit
override this method to perform take downs after all processes have finished and before the process shuts down.
override this method to perform take downs after all processes have finished and before the process shuts down.
- Definition Classes
- Protocol
- def out: PrintWriter
-
def
preStart(): Unit
override this method to perform initializations just before the process begins to run.
override this method to perform initializations just before the process begins to run.
- Definition Classes
- Protocol
-
def
process: PID
identifier of the process to which the protocol is attached.
identifier of the process to which the protocol is attached.
- returns
identifier of the process
- Definition Classes
- ProtocolImpl → Protocol
-
def
receiver: Receiver
receiver to which this protocol delivers messages.
receiver to which this protocol delivers messages. Typically, this is the message dispatcher of the process.
- returns
receiver to which messages are delivered
- Definition Classes
- ProtocolUtils
-
def
receiver_=(receiver: Receiver): Unit
sets a new receiver to which this protocol will deliver messages.
sets a new receiver to which this protocol will deliver messages. Normally, there is no need for the application programmer to use this, as the receiver is automatically set to a meaningful default value.
- receiver
new receiver to which messages will be delivered
- Definition Classes
- ProtocolUtils
-
def
sender: Sender
target sender that will handle Sending#send operations for this protocol.
target sender that will handle Sending#send operations for this protocol.
- returns
target sender
- Definition Classes
- ProtocolUtils
-
def
senderOpt: Option[Sender]
- Definition Classes
- ProtocolUtils
-
def
simpleName: String
- Definition Classes
- Protocol → NamedEntity
-
def
start(): Unit
override this method to perform initialization just as the process starts.
override this method to perform initialization just as the process starts.
- Definition Classes
- Protocol
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
system: NekoSystem
system in which the protocol is running.
system in which the protocol is running. This gives access to some general information about the system, such as the total number of processes.
- returns
the system in which the protocol runs.
- Definition Classes
- ProtocolImpl → Protocol
-
def
toString(): String
- Definition Classes
- ProtocolImpl → AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (ProtocolImpl, B)
- Implicit
- This member is added by an implicit conversion from ProtocolImpl to ArrowAssoc[ProtocolImpl] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc