Interface OperationFactory


public interface OperationFactory
Gameplay Operation Factory
Since:
21.8
Author:
渔民小镇
date:
2024-05-12
  • Method Details

    • getOperationHandler

      OperationHandler getOperationHandler(int operation)
      Get OperationHandler (Gameplay Operation Business Class)
      Parameters:
      operation - Operation code
      Returns:
      Business logic handler corresponding to the operation code
    • getUserOperationHandler

      OperationHandler getUserOperationHandler(int operation)
      Get OperationHandler that the user can operate (Gameplay Operation Business Class)
      Parameters:
      operation - Operation code
      Returns:
      Gameplay Operation Business Class
    • mapping

      void mapping(int operation, OperationHandler operationHandler)
      Associate the operation code with the OperationHandler (Gameplay Operation Business Class)
      Parameters:
      operation - Operation code
      operationHandler - Gameplay Operation Business Class
    • mappingUser

      void mappingUser(int operation, OperationHandler operationHandler)
      OperationHandler that the user can operate. Associate the operation code with the OperationHandler (Gameplay Operation Business Class)
      Parameters:
      operation - Operation code
      operationHandler - Gameplay Operation Business Class
    • mappingUser

      default void mappingUser(OperationCode operationCode, OperationHandler operationHandler)
      OperationHandler that the user can operate. Associate the operation code with the OperationHandler (Gameplay Operation Business Class)
      Parameters:
      operationCode - Operation code
      operationHandler - Gameplay Operation Business Class
      Since:
      21.23
    • mapping

      default void mapping(OperationCode operationCode, OperationHandler operationHandler)
      Associate the operation code with the OperationHandler (Gameplay Operation Business Class)
      Parameters:
      operationCode - Operation code
      operationHandler - Gameplay Operation Business Class
      Since:
      21.23
    • optionalOperationHandler

      Optional<OperationHandler> optionalOperationHandler(int operation)
      Get OperationHandler Optional by operation code
      Parameters:
      operation - Operation code
      Returns:
      Optional OperationHandler
    • of

      static OperationFactory of()
      Create OperationFactory object (Built-in implementation provided by the framework)
      Returns:
      OperationFactory object