Add pre-execution checks with CommandHandlerExecutor to CommandHandler #242
+1
-1
@@ -7,7 +7,7 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatch
|
||||
import java.util.Optional;
|
||||
|
||||
/** Handles {@link CheckUsernameRequest}s to check whether a username is available. */
|
||||
public class CheckUsernameHandler implements CommandHandler<CheckUsernameRequest> {
|
||||
public class CheckUsernameHandler extends CommandHandler<CheckUsernameRequest> {
|
||||
private final ResponseDispatcher responseDispatcher;
|
||||
private final UserRegistry userRegistry;
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.Optional;
|
||||
* Handles {@link LoginRequest}s to create a user for a session, if the session has not assigned one
|
||||
* already
|
||||
*/
|
||||
public class LoginHandler implements CommandHandler<LoginRequest> {
|
||||
public class LoginHandler extends CommandHandler<LoginRequest> {
|
||||
private final ResponseDispatcher responseDispatcher;
|
||||
private final UserRegistry userRegistry;
|
||||
private final UserFactory userFactory;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.OkRespon
|
||||
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatcher.ResponseDispatcher;
|
||||
|
||||
/** Handles {@link LogoutRequest} to logout connected user. */
|
||||
public class LogoutHandler implements CommandHandler<LogoutRequest> {
|
||||
public class LogoutHandler extends CommandHandler<LogoutRequest> {
|
||||
private final ResponseDispatcher responseDispatcher;
|
||||
private final UserRegistry userRegistry;
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.OkRespon
|
||||
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatcher.ResponseDispatcher;
|
||||
|
||||
/** Handler for {@link PingRequest}. */
|
||||
public class PingHandler implements CommandHandler<PingRequest> {
|
||||
public class PingHandler extends CommandHandler<PingRequest> {
|
||||
private final ResponseDispatcher responseDispatcher;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user