Class Message

java.lang.Object
best.skn.utils.message.Message

public class Message extends Object
Message Class as main API
Since:
2024-03-12
Version:
1.3.0
Author:
SKN Shukhan
Use Case:
Java, Java Spring Boot
Dedicated To:
Logno, Atoshi and My Parents
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Private constructor to make the class non-instantiable
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Outputs error message on console when a process fails to complete
    static reactor.core.publisher.Mono<String>
    errorMono(String message)
    Outputs error message as server mono response on API request failure
    static String
    Outputs error message as server response on API request failure
    static String
    Outputs info message on console when a process needs to notify something excluding failure and success
    static reactor.core.publisher.Mono<String>
    infoMono(String message)
    Outputs info message as server mono response on API request success/failure
    static String
    infoServer(String message)
    Outputs info message as server response on API request success/failure
    static String
    Outputs success message on console when a process succeeds to complete
    static reactor.core.publisher.Mono<String>
    Outputs success message as server mono response on API request success
    static String
    Outputs success message as server response on API request success
    static void
    Public static method to throw Unsupported Instantiation Error

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Message

      private Message()
      Private constructor to make the class non-instantiable
      Since:
      v1.1.0
  • Method Details

    • infoConsole

      public static String infoConsole(String message)
      Outputs info message on console when a process needs to notify something excluding failure and success
      Parameters:
      message - a String containing the actual info message
      Returns:
      a String containing formatted info message
      Since:
      v1.0.0
    • infoServer

      public static String infoServer(String message)
      Outputs info message as server response on API request success/failure
      Parameters:
      message - a String containing the actual info message
      Returns:
      a String containing formatted info message
      Since:
      v1.1.0
    • infoMono

      public static reactor.core.publisher.Mono<String> infoMono(String message)
      Outputs info message as server mono response on API request success/failure
      Parameters:
      message - a String containing the actual info message
      Returns:
      a Mono of String containing formatted info message
      Since:
      v1.1.0
    • successConsole

      public static String successConsole(String message)
      Outputs success message on console when a process succeeds to complete
      Parameters:
      message - a String containing the actual success message
      Returns:
      a String containing formatted success message
      Since:
      v1.0.0
    • successServer

      public static String successServer(String message)
      Outputs success message as server response on API request success
      Parameters:
      message - a String containing the actual success message
      Returns:
      a String containing formatted success message
      Since:
      v1.0.0
    • successMono

      public static reactor.core.publisher.Mono<String> successMono(String message)
      Outputs success message as server mono response on API request success
      Parameters:
      message - a String containing the actual success message
      Returns:
      a Mono of String containing formatted success message
      Since:
      v1.0.0
    • errorConsole

      public static String errorConsole(String message)
      Outputs error message on console when a process fails to complete
      Parameters:
      message - a String containing the actual error message
      Returns:
      a String containing formatted error message
      Since:
      v1.0.0
    • errorServer

      public static String errorServer(String message)
      Outputs error message as server response on API request failure
      Parameters:
      message - a String containing the actual error message
      Returns:
      a String containing formatted error message
      Since:
      v1.0.0
    • errorMono

      public static reactor.core.publisher.Mono<String> errorMono(String message)
      Outputs error message as server mono response on API request failure
      Parameters:
      message - a String containing the actual error message
      Returns:
      a Mono of String containing formatted error message
      Since:
      v1.0.0
    • throwInstantiationError

      public static void throwInstantiationError() throws UnsupportedOperationException
      Public static method to throw Unsupported Instantiation Error
      Throws:
      UnsupportedOperationException
      Since:
      v1.1.0