C# 클래스 Akka.Actor.ActorBase

Class ActorBase.
파일 보기 프로젝트 열기: rogeralsing/akka.net 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Become void
Clear void
Unbecome void
Unclear void

보호된 메소드들

메소드 설명
ActorBase ( ) : System

Initializes a new instance of the ActorBase class.

AroundReceive ( Receive receive, object message ) : bool
Become ( Receive receive ) : void

Changes the actor's command behavior and replaces the current receive handler with the specified handler.

BecomeStacked ( Receive receive ) : void

Changes the actor's behavior and replaces the current receive handler with the specified handler. The current handler is stored on a stack, and you can revert to it by calling IActorContext.UnbecomeStacked Please note, that in order to not leak memory, make sure every call to BecomeStacked is matched with a call to IActorContext.UnbecomeStacked.

Receive ( object message ) : bool

Processor for user defined messages.

SetReceiveTimeout ( TimeSpan timeout ) : void

Defines the inactivity timeout after which the sending of a ReceiveTimeout message is triggered. When specified, the receive function should be able to handle a ReceiveTimeout message.

Please note that the receive timeout might fire and enqueue the ReceiveTimeout message right after another message was enqueued; hence it is not guaranteed that upon reception of the receive timeout there must have been an idle period beforehand as configured via this method.

Once set, the receive timeout stays in effect (i.e. continues firing repeatedly after inactivity periods). Pass in null to switch off this feature.

UnbecomeStacked ( ) : void

Reverts the Actor behavior to the previous one on the behavior stack.

Unhandled ( object message ) : void

Is called when a message isn't handled by the current behavior of the actor by default it fails with either a DeathPactException (in case of an unhandled Terminated message) or publishes an UnhandledMessage to the actor's system's EventStream

비공개 메소드들

메소드 설명
Become ( Receive receive, bool discardOld = true ) : void
Clear ( IActorRef self ) : void
Unbecome ( ) : void
Unclear ( ) : void

메소드 상세

ActorBase() 보호된 메소드

Initializes a new instance of the ActorBase class.
Do not create actors using 'new', always create them using an ActorContext/System
protected ActorBase ( ) : System
리턴 System

AroundReceive() 보호된 메소드

protected AroundReceive ( Receive receive, object message ) : bool
receive Receive
message object
리턴 bool

Become() 보호된 메소드

Changes the actor's command behavior and replaces the current receive handler with the specified handler.
protected Become ( Receive receive ) : void
receive Receive The new message handler.
리턴 void

BecomeStacked() 보호된 메소드

Changes the actor's behavior and replaces the current receive handler with the specified handler. The current handler is stored on a stack, and you can revert to it by calling IActorContext.UnbecomeStacked Please note, that in order to not leak memory, make sure every call to BecomeStacked is matched with a call to IActorContext.UnbecomeStacked.
protected BecomeStacked ( Receive receive ) : void
receive Receive The new message handler.
리턴 void

Receive() 보호된 추상적인 메소드

Processor for user defined messages.
protected abstract Receive ( object message ) : bool
message object The message.
리턴 bool

SetReceiveTimeout() 보호된 메소드

Defines the inactivity timeout after which the sending of a ReceiveTimeout message is triggered. When specified, the receive function should be able to handle a ReceiveTimeout message.

Please note that the receive timeout might fire and enqueue the ReceiveTimeout message right after another message was enqueued; hence it is not guaranteed that upon reception of the receive timeout there must have been an idle period beforehand as configured via this method.

Once set, the receive timeout stays in effect (i.e. continues firing repeatedly after inactivity periods). Pass in null to switch off this feature.

protected SetReceiveTimeout ( TimeSpan timeout ) : void
timeout TimeSpan The timeout. Pass in null to switch off this feature.
리턴 void

UnbecomeStacked() 보호된 메소드

Reverts the Actor behavior to the previous one on the behavior stack.
protected UnbecomeStacked ( ) : void
리턴 void

Unhandled() 보호된 메소드

Is called when a message isn't handled by the current behavior of the actor by default it fails with either a DeathPactException (in case of an unhandled Terminated message) or publishes an UnhandledMessage to the actor's system's EventStream
protected Unhandled ( object message ) : void
message object The unhandled message.
리턴 void