Photon Server API
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
Photon.Hive.Actor Class Reference

An actor is the glue between HivePeer and Room. In addition to the peer it has a number and Properties. More...

Inheritance diagram for Photon.Hive.Actor:
Photon.Hive.Tests.TestActor

Public Member Functions

 Actor (HivePeer peer)
 Initializes a new instance of the Actor class. More...
 
 Actor (int actorNr, string userId)
 
void Deactivate ()
 
void Reactivate (HivePeer peer)
 
void AddGroup (ActorGroup group)
 
void RemoveGroups (byte[] groupIds)
 
override string ToString ()
 
SerializableActor Serialize (bool withDebugInfo)
 

Static Public Member Functions

static Actor Deserialize (SerializableActor a)
 

Public Attributes

const byte BinrayPropertiesId = 1
 

Static Public Attributes

static readonly string ActorNrKey = HiveHostActorState.ActorNr.ToString()
 
static readonly string UserIdKey = HiveHostActorState.UserId.ToString()
 
static readonly string BinaryKey = HiveHostActorState.Binary.ToString()
 
static readonly string NicknameKey = HiveHostActorState.Nickname.ToString()
 

Protected Member Functions

 Actor (int actorNr, string userId, IDictionary properties, DateTime?deactivationTime)
 

Properties

int ActorNr [get, set]
 Gets or sets the actor nr. More...
 
IDisposable CleanUpTimer [get, set]
 Reference to timer which will clean Actor after disconnect More...
 
DateTime DeactivationTime [get, set]
 Time stamp when actor was deactivated More...
 
HivePeer Peer [get, set]
 Gets or sets the peer. More...
 
bool IsInactive [get]
 
bool IsActive [get]
 
PropertyBag< object > Properties [get]
 Gets the actors custom properties. More...
 
string UserId [get]
 
string Nickname [get]
 
object Secure [get]
 
object this[object key] [get, set]
 

Detailed Description

An actor is the glue between HivePeer and Room. In addition to the peer it has a number and Properties.

Constructor & Destructor Documentation

Photon.Hive.Actor.Actor ( HivePeer  peer)
inline

Initializes a new instance of the Actor class.

Parameters
peerThe peer for this actor.
Photon.Hive.Actor.Actor ( int  actorNr,
string  userId 
)
inline
Photon.Hive.Actor.Actor ( int  actorNr,
string  userId,
IDictionary  properties,
DateTime?  deactivationTime 
)
inlineprotected

Member Function Documentation

void Photon.Hive.Actor.AddGroup ( ActorGroup  group)
inline
void Photon.Hive.Actor.Deactivate ( )
inline
static Actor Photon.Hive.Actor.Deserialize ( SerializableActor  a)
inlinestatic
void Photon.Hive.Actor.Reactivate ( HivePeer  peer)
inline
void Photon.Hive.Actor.RemoveGroups ( byte[]  groupIds)
inline
SerializableActor Photon.Hive.Actor.Serialize ( bool  withDebugInfo)
inline
override string Photon.Hive.Actor.ToString ( )
inline

Member Data Documentation

readonly string Photon.Hive.Actor.ActorNrKey = HiveHostActorState.ActorNr.ToString()
static
readonly string Photon.Hive.Actor.BinaryKey = HiveHostActorState.Binary.ToString()
static
const byte Photon.Hive.Actor.BinrayPropertiesId = 1
readonly string Photon.Hive.Actor.NicknameKey = HiveHostActorState.Nickname.ToString()
static
readonly string Photon.Hive.Actor.UserIdKey = HiveHostActorState.UserId.ToString()
static

Property Documentation

int Photon.Hive.Actor.ActorNr
getset

Gets or sets the actor nr.

IDisposable Photon.Hive.Actor.CleanUpTimer
getset

Reference to timer which will clean Actor after disconnect

DateTime Photon.Hive.Actor.DeactivationTime
getset

Time stamp when actor was deactivated

bool Photon.Hive.Actor.IsActive
get
bool Photon.Hive.Actor.IsInactive
get
string Photon.Hive.Actor.Nickname
get
HivePeer Photon.Hive.Actor.Peer
getset

Gets or sets the peer.

PropertyBag<object> Photon.Hive.Actor.Properties
get

Gets the actors custom properties.

object Photon.Hive.Actor.Secure
get
object Photon.Hive.Actor.this[object key]
getset
string Photon.Hive.Actor.UserId
get