Package com.smartfoxserver.v2.core
Class SFSEvent
- java.lang.Object
-
- com.smartfoxserver.v2.core.SFSEvent
-
- All Implemented Interfaces:
ISFSEvent
public class SFSEvent extends java.lang.Object implements ISFSEvent
The SFSEvent represents a Server side event. The SFS2X framework provide a large selection of events that any Extension can listen to in order to react to various changes happening at runtime. For example server events can notify the creation or destruction of a Room, the disconnection of a User, the login of a client and much more.- See Also:
SFSEventType
-
-
Constructor Summary
Constructors Constructor Description SFSEvent(SFSEventType type)
SFSEvent(SFSEventType type, java.util.Map<ISFSEventParam,java.lang.Object> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getParameter(ISFSEventParam id)
Get a parameter from the event objectSFSEventType
getType()
Get the type of the eventjava.lang.String
toString()
-
-
-
Constructor Detail
-
SFSEvent
public SFSEvent(SFSEventType type)
-
SFSEvent
public SFSEvent(SFSEventType type, java.util.Map<ISFSEventParam,java.lang.Object> params)
-
-
Method Detail
-
getType
public SFSEventType getType()
Get the type of the event- Specified by:
getType
in interfaceISFSEvent
- Returns:
- the type of the event
- See Also:
SFSEventType
-
getParameter
public java.lang.Object getParameter(ISFSEventParam id)
Get a parameter from the event object- Specified by:
getParameter
in interfaceISFSEvent
- Parameters:
id
- the id/name of the parameter- Returns:
- the parameter value
- See Also:
SFSEventParam
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-