Class IncomingSocketMessageEvent
java.lang.Object
de.craftsblock.craftscore.event.Event
de.craftsblock.craftscore.event.CancellableEvent
de.craftsblock.craftsnet.events.sockets.message.IncomingSocketMessageEvent
- All Implemented Interfaces:
de.craftsblock.craftscore.event.Cancellable,GenericSocketEventBase,GenericSocketMessageEventBase
public class IncomingSocketMessageEvent
extends de.craftsblock.craftscore.event.CancellableEvent
implements GenericSocketMessageEventBase
The IncomingSocketMessageEvent class represents an event related to an incoming message on a websocket connection.
It extends the base
CancellableEvent to support event cancellation.- Since:
- 2.1.1-SNAPSHOT
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIncomingSocketMessageEvent(SocketExchange exchange, @NotNull Frame frame) Constructs a new IncomingSocketMessageEvent with the specified SocketExchange and incoming message data. -
Method Summary
Modifier and TypeMethodDescription@NotNull SocketExchangeGets theSocketExchangewhich stores the involved client, server and some other data.getFrame()Gets the incoming message as aFrameobject.Methods inherited from class de.craftsblock.craftscore.event.CancellableEvent
isCancelled, setCancelledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.craftsblock.craftsnet.events.sockets.GenericSocketEventBase
getClient, getServerMethods inherited from interface de.craftsblock.craftsnet.events.sockets.message.GenericSocketMessageEventBase
getBuffer, getData, getOpcode, getUtf8
-
Constructor Details
-
IncomingSocketMessageEvent
Constructs a new IncomingSocketMessageEvent with the specified SocketExchange and incoming message data.- Parameters:
exchange- The SocketExchange object representing the socket connection and its associated data.frame- The incoming message frame for this event.
-
-
Method Details
-
getExchange
Gets theSocketExchangewhich stores the involved client, server and some other data.- Specified by:
getExchangein interfaceGenericSocketEventBase- Returns:
- The
SocketExchange.
-
getFrame
Gets the incoming message as aFrameobject.- Specified by:
getFramein interfaceGenericSocketMessageEventBase- Returns:
- The incoming message.
-