Packagecom.electrotank.electroserver4.message
Classpublic class MessageType

This class stores static variables that act as a message definition. All messages (requests, responses, events) have a getMessageType() method. The value of it is one of the static variables in this class.


Example
This example shows how to use this class when adding event listeners.
    import com.electrotank.electroserver4.ElectroServer;
    import com.electrotank.electroserver4.message.request.
    import com.electrotank.electroserver4.message.response.LoginResponse;
    //
    var es:ElectroServer;//assume a connection was made elsewhere
    es.addEventListener(MessageType.LoginResponse, "onLoginResponse", this);
    function onLoginResponse(e:LoginResponse):void {

        //do something
    }
     
This example is contrived but does show one use.
    import com.electrotank.electroserver4.message.Message;
    import com.electrotank.electroserver4.message.MessageType;
    import com.electrotank.electroserver4.message.request.
    //
    var messages:Array = new Array();
    for (var i:int=0;i



Public Properties
 PropertyDefined by
  AddBuddyRequest : MessageType
[static] This variable refers to the AddBuddyRequest request.
MessageType
  AdditionalLoginRequest : MessageType
[static] This variable refers to the AdditionalLoginRequest request.
MessageType
  AddRoomOperatorRequest : MessageType
[static] This variable refers to the AddRoomOperatorRequest request.
MessageType
  BuddyStatusUpdatedEvent : MessageType
[static] This variable refers to the BuddyStatusUpdatedEvent event.
MessageType
  ClientIdleEvent : MessageType
[static] This variable refers to the ConnectionEvent event.
MessageType
  CompositePluginMessageEvent : MessageType
[static] This variable refers to the CompositePluginMessageEvent event.
MessageType
  ConnectionClosedEvent : MessageType
[static] This variable refers to the ConnectionClosedEvent event.
MessageType
  ConnectionEvent : MessageType
[static] This variable refers to the ConnectionEvent event.
MessageType
  CreateOrJoinGameRequest : MessageType
[static] This variable refers to the CreateOrJoinGameRequest request.
MessageType
  CreateOrJoinGameResponse : MessageType
[static] This variable refers to the CreateOrJoinGameResponse response.
MessageType
  CreateRoomRequest : MessageType
[static] This variable refers to the CreateRoomRequest request.
MessageType
  CreateRoomVariableRequest : MessageType
[static] This variable refers to the CreateRoomVariableRequest request.
MessageType
  DeleteRoomVariableRequest : MessageType
[static] This variable refers to the DeleteRoomVariableRequest request.
MessageType
  DeleteUserVariableRequest : MessageType
[static] This variable refers to the DeleteUserVariableRequest request.
MessageType
  EvictUserFromRoomRequest : MessageType
[static] This variable refers to the EvictUserFromRoomRequest request.
MessageType
  FindGamesRequest : MessageType
[static] This variable refers to the FindGamesRequest request.
MessageType
  FindGamesResponse : MessageType
[static] This variable refers to the FindGamesResponse response.
MessageType
  FindZoneAndRoomByNameRequest : MessageType
[static] This variable refers to the FindZoneAndRoomByNameRequest request.
MessageType
  FindZoneAndRoomByNameResponse : MessageType
[static] This variable refers to the FindZoneAndRoomByNameResponse response.
MessageType
  GateWayKickUserRequest : MessageType
[static] This variable refers to the GateWayKickUserRequest request.
MessageType
  GenericErrorResponse : MessageType
[static] This variable refers to the GenericErrorResponse response.
MessageType
  GetRoomsInZoneRequest : MessageType
[static] This variable refers to the GetRoomsInZoneRequest request.
MessageType
  GetRoomsInZoneResponse : MessageType
[static] This variable refers to the GetRoomsInZoneResponse response.
MessageType
  GetUserCountRequest : MessageType
[static] This variable refers to the GetUserCountRequest request.
MessageType
  GetUserCountResponse : MessageType
[static] This variable refers to the GetUserCountResponse response.
MessageType
  GetUsersInRoomRequest : MessageType
[static] This variable refers to the GetUsersInRoomRequest request.
MessageType
  GetUsersInRoomResponse : MessageType
[static] This variable refers to the GetUsersInRoomResponse response.
MessageType
  GetUserVariablesRequest : MessageType
[static] This variable refers to the GetUserVariablesRequest request.
MessageType
  GetUserVariablesResponse : MessageType
[static] This variable refers to the GetUserVariablesResponse response.
MessageType
  GetZonesRequest : MessageType
[static] This variable refers to the GetZonesRequest request.
MessageType
  GetZonesResponse : MessageType
[static] This variable refers to the GetZonesResponseresponse.
MessageType
  JoinRoomEvent : MessageType
[static] This variable refers to the JoinRoomEvent event.
MessageType
  JoinRoomRequest : MessageType
[static] This variable refers to the JoinRoomRequest request.
MessageType
  JoinZoneEvent : MessageType
[static] This variable refers to the JoinZoneEvent event.
MessageType
  LeaveRoomEvent : MessageType
[static] This variable refers to the LeaveRoomEvent event.
MessageType
  LeaveRoomRequest : MessageType
[static] This variable refers to the LeaveRoomRequest request.
MessageType
  LeaveZoneEvent : MessageType
[static] This variable refers to the LeaveZoneEvent event.
MessageType
  LoginRequest : MessageType
[static] This variable refers to the LoginRequest request.
MessageType
  LoginResponse : MessageType
[static] This variable refers to the LoginResponse response.
MessageType
  LogoutRequest : MessageType
[static] This variable refers to the LogoutRequest request.
MessageType
  PluginMessageEvent : MessageType
[static] This variable refers to the PluginMessageEvent event.
MessageType
  PluginRequest : MessageType
[static] This variable refers to the PluginRequest request.
MessageType
  PrivateMessageEvent : MessageType
[static] This variable refers to the PrivateMessageEvent event.
MessageType
  PrivateMessageRequest : MessageType
[static] This variable refers to the PrivateMessageRequest request.
MessageType
  PublicMessageEvent : MessageType
[static] This variable refers to the PublicMessageEvent event.
MessageType
  PublicMessageRequest : MessageType
[static] This variable refers to the PublicMessageRequest request.
MessageType
  RemoveBuddyRequest : MessageType
[static] This variable refers to the RemoveBuddyRequest request.
MessageType
  RemoveRoomOperatorRequest : MessageType
[static] This variable refers to the RemoveRoomOperatorRequest request.
MessageType
  RoomVariableUpdateEvent : MessageType
[static] This variable refers to the RoomVariableUpdateEvent event.
MessageType
  RtmpConnectionClosedEvent : MessageType
[static] This variable refers to the RtmpConnectionClosedEvent event.
MessageType
  RtmpConnectionEvent : MessageType
[static] This variable refers to the RtmpConnectionEvent event.
MessageType
  RtmpOnStatusEvent : MessageType
[static] This variable refers to the RtmpOnStatusEvent event.
MessageType
  UpdateRoomDetailsEvent : MessageType
[static] This variable refers to the UpdateRoomDetailsEvent event.
MessageType
  UpdateRoomDetailsRequest : MessageType
[static] This variable refers to the UpdateRoomDetailsRequest request.
MessageType
  UpdateRoomVariableRequest : MessageType
[static] This variable refers to the UpdateRoomVariableRequest request.
MessageType
  UpdateUserVariableRequest : MessageType
[static] This variable refers to the UpdateUserVariableRequest request.
MessageType
  UserEvictedFromRoomEvent : MessageType
[static] This variable refers to the UserEvictedFromRoomEvent event.
MessageType
  UserListUpdateEvent : MessageType
[static] This variable refers to the UserListUpdateEvent event.
MessageType
  UserVariableUpdateEvent : MessageType
[static] This variable refers to the UserVariableUpdateEvent event.
MessageType
  ValidateAdditionalLoginRequest : MessageType
[static] This variable refers to the ValidateAdditionalLoginRequest request.
MessageType
  ValidateAdditionalLoginResponse : MessageType
[static] This variable refers to the ValidateAdditionalLoginResponse response.
MessageType
  ZoneUpdateEvent : MessageType
[static] This variable refers to the ZoneUpdateEvent event.
MessageType
Public Methods
 MethodDefined by
  
MessageType(id:String, name:String, req:Boolean, res:Boolean, ev:Boolean)
Creates a new instance of the MessageType class.
MessageType
  
[static] Every message has a unique id.
MessageType
  
getIsEvent():Boolean
Gets the isEvent property.
MessageType
  
getIsRequest():Boolean
Gets the isRequest property.
MessageType
  
getIsResponse():Boolean
Gets the isResponse property.
MessageType
  
The message type id.
MessageType
  
Gets the message type name.
MessageType
  
setIsEvent(val:Boolean):void
Sets the isEvent property.
MessageType
  
setIsRequest(val:Boolean):void
Sets the isRequst property.
MessageType
  
setIsResponse(val:Boolean):void
Sets the isResponse property.
MessageType
  
setMessageTypeId(id:String):void
Sets the message type id.
MessageType
  
setMessageTypeName(name:String):void
Sets the message type name.
MessageType
Property detail
AddBuddyRequestproperty
public static var AddBuddyRequest:MessageType

This variable refers to the AddBuddyRequest request.

AdditionalLoginRequestproperty 
public static var AdditionalLoginRequest:MessageType

This variable refers to the AdditionalLoginRequest request.

AddRoomOperatorRequestproperty 
public static var AddRoomOperatorRequest:MessageType

This variable refers to the AddRoomOperatorRequest request.

BuddyStatusUpdatedEventproperty 
public static var BuddyStatusUpdatedEvent:MessageType

This variable refers to the BuddyStatusUpdatedEvent event.

ClientIdleEventproperty 
public static var ClientIdleEvent:MessageType

This variable refers to the ConnectionEvent event.

CompositePluginMessageEventproperty 
public static var CompositePluginMessageEvent:MessageType

This variable refers to the CompositePluginMessageEvent event.

ConnectionClosedEventproperty 
public static var ConnectionClosedEvent:MessageType

This variable refers to the ConnectionClosedEvent event.

ConnectionEventproperty 
public static var ConnectionEvent:MessageType

This variable refers to the ConnectionEvent event.

CreateOrJoinGameRequestproperty 
public static var CreateOrJoinGameRequest:MessageType

This variable refers to the CreateOrJoinGameRequest request.

CreateOrJoinGameResponseproperty 
public static var CreateOrJoinGameResponse:MessageType

This variable refers to the CreateOrJoinGameResponse response.

CreateRoomRequestproperty 
public static var CreateRoomRequest:MessageType

This variable refers to the CreateRoomRequest request.

CreateRoomVariableRequestproperty 
public static var CreateRoomVariableRequest:MessageType

This variable refers to the CreateRoomVariableRequest request.

DeleteRoomVariableRequestproperty 
public static var DeleteRoomVariableRequest:MessageType

This variable refers to the DeleteRoomVariableRequest request.

DeleteUserVariableRequestproperty 
public static var DeleteUserVariableRequest:MessageType

This variable refers to the DeleteUserVariableRequest request.

EvictUserFromRoomRequestproperty 
public static var EvictUserFromRoomRequest:MessageType

This variable refers to the EvictUserFromRoomRequest request.

FindGamesRequestproperty 
public static var FindGamesRequest:MessageType

This variable refers to the FindGamesRequest request.

FindGamesResponseproperty 
public static var FindGamesResponse:MessageType

This variable refers to the FindGamesResponse response.

FindZoneAndRoomByNameRequestproperty 
public static var FindZoneAndRoomByNameRequest:MessageType

This variable refers to the FindZoneAndRoomByNameRequest request.

FindZoneAndRoomByNameResponseproperty 
public static var FindZoneAndRoomByNameResponse:MessageType

This variable refers to the FindZoneAndRoomByNameResponse response.

GateWayKickUserRequestproperty 
public static var GateWayKickUserRequest:MessageType

This variable refers to the GateWayKickUserRequest request.

GenericErrorResponseproperty 
public static var GenericErrorResponse:MessageType

This variable refers to the GenericErrorResponse response.

GetRoomsInZoneRequestproperty 
public static var GetRoomsInZoneRequest:MessageType

This variable refers to the GetRoomsInZoneRequest request.

GetRoomsInZoneResponseproperty 
public static var GetRoomsInZoneResponse:MessageType

This variable refers to the GetRoomsInZoneResponse response.

GetUserCountRequestproperty 
public static var GetUserCountRequest:MessageType

This variable refers to the GetUserCountRequest request.

GetUserCountResponseproperty 
public static var GetUserCountResponse:MessageType

This variable refers to the GetUserCountResponse response.

GetUsersInRoomRequestproperty 
public static var GetUsersInRoomRequest:MessageType

This variable refers to the GetUsersInRoomRequest request.

GetUsersInRoomResponseproperty 
public static var GetUsersInRoomResponse:MessageType

This variable refers to the GetUsersInRoomResponse response.

GetUserVariablesRequestproperty 
public static var GetUserVariablesRequest:MessageType

This variable refers to the GetUserVariablesRequest request.

GetUserVariablesResponseproperty 
public static var GetUserVariablesResponse:MessageType

This variable refers to the GetUserVariablesResponse response.

GetZonesRequestproperty 
public static var GetZonesRequest:MessageType

This variable refers to the GetZonesRequest request.

GetZonesResponseproperty 
public static var GetZonesResponse:MessageType

This variable refers to the GetZonesResponseresponse.

JoinRoomEventproperty 
public static var JoinRoomEvent:MessageType

This variable refers to the JoinRoomEvent event.

JoinRoomRequestproperty 
public static var JoinRoomRequest:MessageType

This variable refers to the JoinRoomRequest request.

JoinZoneEventproperty 
public static var JoinZoneEvent:MessageType

This variable refers to the JoinZoneEvent event.

LeaveRoomEventproperty 
public static var LeaveRoomEvent:MessageType

This variable refers to the LeaveRoomEvent event.

LeaveRoomRequestproperty 
public static var LeaveRoomRequest:MessageType

This variable refers to the LeaveRoomRequest request.

LeaveZoneEventproperty 
public static var LeaveZoneEvent:MessageType

This variable refers to the LeaveZoneEvent event.

LoginRequestproperty 
public static var LoginRequest:MessageType

This variable refers to the LoginRequest request.

LoginResponseproperty 
public static var LoginResponse:MessageType

This variable refers to the LoginResponse response.

LogoutRequestproperty 
public static var LogoutRequest:MessageType

This variable refers to the LogoutRequest request.

PluginMessageEventproperty 
public static var PluginMessageEvent:MessageType

This variable refers to the PluginMessageEvent event.

PluginRequestproperty 
public static var PluginRequest:MessageType

This variable refers to the PluginRequest request.

PrivateMessageEventproperty 
public static var PrivateMessageEvent:MessageType

This variable refers to the PrivateMessageEvent event.

PrivateMessageRequestproperty 
public static var PrivateMessageRequest:MessageType

This variable refers to the PrivateMessageRequest request.

PublicMessageEventproperty 
public static var PublicMessageEvent:MessageType

This variable refers to the PublicMessageEvent event.

PublicMessageRequestproperty 
public static var PublicMessageRequest:MessageType

This variable refers to the PublicMessageRequest request.

RemoveBuddyRequestproperty 
public static var RemoveBuddyRequest:MessageType

This variable refers to the RemoveBuddyRequest request.

RemoveRoomOperatorRequestproperty 
public static var RemoveRoomOperatorRequest:MessageType

This variable refers to the RemoveRoomOperatorRequest request.

RoomVariableUpdateEventproperty 
public static var RoomVariableUpdateEvent:MessageType

This variable refers to the RoomVariableUpdateEvent event.

RtmpConnectionClosedEventproperty 
public static var RtmpConnectionClosedEvent:MessageType

This variable refers to the RtmpConnectionClosedEvent event.

RtmpConnectionEventproperty 
public static var RtmpConnectionEvent:MessageType

This variable refers to the RtmpConnectionEvent event.

RtmpOnStatusEventproperty 
public static var RtmpOnStatusEvent:MessageType

This variable refers to the RtmpOnStatusEvent event.

UpdateRoomDetailsEventproperty 
public static var UpdateRoomDetailsEvent:MessageType

This variable refers to the UpdateRoomDetailsEvent event.

UpdateRoomDetailsRequestproperty 
public static var UpdateRoomDetailsRequest:MessageType

This variable refers to the UpdateRoomDetailsRequest request.

UpdateRoomVariableRequestproperty 
public static var UpdateRoomVariableRequest:MessageType

This variable refers to the UpdateRoomVariableRequest request.

UpdateUserVariableRequestproperty 
public static var UpdateUserVariableRequest:MessageType

This variable refers to the UpdateUserVariableRequest request.

UserEvictedFromRoomEventproperty 
public static var UserEvictedFromRoomEvent:MessageType

This variable refers to the UserEvictedFromRoomEvent event.

UserListUpdateEventproperty 
public static var UserListUpdateEvent:MessageType

This variable refers to the UserListUpdateEvent event.

UserVariableUpdateEventproperty 
public static var UserVariableUpdateEvent:MessageType

This variable refers to the UserVariableUpdateEvent event.

ValidateAdditionalLoginRequestproperty 
public static var ValidateAdditionalLoginRequest:MessageType

This variable refers to the ValidateAdditionalLoginRequest request.

ValidateAdditionalLoginResponseproperty 
public static var ValidateAdditionalLoginResponse:MessageType

This variable refers to the ValidateAdditionalLoginResponse response.

ZoneUpdateEventproperty 
public static var ZoneUpdateEvent:MessageType

This variable refers to the ZoneUpdateEvent event.

Constructor detail
MessageType()constructor
public function MessageType(id:String, name:String, req:Boolean, res:Boolean, ev:Boolean)

Creates a new instance of the MessageType class. Pass in the message type id, which should be unique, the name, and boolean values to set if it is a request, event, or response.

Parameters
id:String — The unique message type id.
 
name:String — The name of the message.
 
req:Boolean — isRequest - true/false
 
res:Boolean — isResponse - true/false
 
ev:Boolean — isEvent - true/false
Method detail
findTypeById()method
public static function findTypeById(id:String):MessageType

Every message has a unique id. This id is used on the server and the client. This method allows you to find the message type base don the id.

Parameters
id:String — The message type id.

Returns
MessageType — The MessageType class associated in the id.
getIsEvent()method 
public function getIsEvent():Boolean

Gets the isEvent property.

Returns
Boolean — True or false.
getIsRequest()method 
public function getIsRequest():Boolean

Gets the isRequest property.

Returns
Boolean — True or false.
getIsResponse()method 
public function getIsResponse():Boolean

Gets the isResponse property.

Returns
Boolean — True or false.
getMessageTypeId()method 
public function getMessageTypeId():String

The message type id.

Returns
String — The message type id.
getMessageTypeName()method 
public function getMessageTypeName():String

Gets the message type name.

Returns
String — The message type name.
setIsEvent()method 
public function setIsEvent(val:Boolean):void

Sets the isEvent property.

Parameters
val:Boolean — True or false.
setIsRequest()method 
public function setIsRequest(val:Boolean):void

Sets the isRequst property.

Parameters
val:Boolean — True or false.
setIsResponse()method 
public function setIsResponse(val:Boolean):void

Sets the isResponse property.

Parameters
val:Boolean — True or false.
setMessageTypeId()method 
public function setMessageTypeId(id:String):void

Sets the message type id. This must be a unique value.

Parameters
id:String — The message type id.
setMessageTypeName()method 
public function setMessageTypeName(name:String):void

Sets the message type name. This is used for friendly logging.

Parameters
name:String — Name of the message type.