Package com.cloud.serverpak.handlers
Class RegUserHandler
java.lang.Object
com.cloud.serverpak.handlers.RegUserHandler
Message Listener class
RegUserRequest.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegUserHandler(MainHandler mainHandler) The constructor saves a reference to the main listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidProcesses a service message - a request to register a new user, checks if there is a user with the same nickname in the database, if there is, then sends refusal to register, and in the absence registers it and sends a response to the client, that the registration was successful.
-
Field Details
-
authService
Authorization service.
-
-
Constructor Details
-
RegUserHandler
The constructor saves a reference to the main listener.- Parameters:
mainHandler- Netty's main listener.
-
-
Method Details
-
regHandle
Processes a service message - a request to register a new user, checks if there is a user with the same nickname in the database, if there is, then sends refusal to register, and in the absence registers it and sends a response to the client, that the registration was successful.- Parameters:
ctx- channel context.msg- the message object.
-