Skip to content

skn437/skn-java-message

Repository files navigation

SKN Java Message Library

java

Java

Maven Central Javadoc Apache License 2.0

 

JavaDocs:

Read the Javadoc for the main API: Message API

 

Introduction:

This is a simple Java Library for notification message on console & server response

I made this library so that I can use it in all of my java projects without writing the same codes over and over again

The main API Class of this library is Message which holds 7 static methods to output notifications

 

Details:

Message Class:

  • It doesn't need to be instantiated
  • It has 10 static methods
  • The notification modes are:
    • Info message on console (It has new line character at the end)
    • Info message as server response
    • Info message as server mono response (Reactive)
    • Success message on console (It has new line character at the end)
    • Success message as server response
    • Success message as server mono response (Reactive)
    • Error message on console (It has new line character at the end)
    • Error message as server response
    • Error message as server mono response (Reactive)
    • Instantiation Error message (Shows Java Unsupported Operation Exception)

 

Use Case:

  • Java
  • Java Spring Boot

 

Requirements:

  • 💀 Minimum Java Version: 21

 

Usage:

For Maven, inside dependencies tag of pom.xml, copy the following

<dependency>
 <groupId>best.skn</groupId>
 <artifactId>skn-java-message</artifactId>
 <version>1.3.0</version>
</dependency>

For Gradle, inside dependencies block of build.gradle.kts, copy the following

implementation("best.skn:skn-java-message:1.3.0")

Inside your Java Code, import the package like this

import best.skn.utils.message.Message;

Use the package like this for normal cases

public class Cat {
  public Cat() {
    System.out.print(Message.infoConsole("Cat Class Instantiated!"));
  }
}

Use the package like this for UnsupportedOperationException

public class Person {
  private Person() {
    Message.throwInstantiationError();
  }
}

 

Dedicated To:

  • 👩‍🎨Prodipta Das Logno & 🧛‍♀️Atoshi Sarker Prithula: The two most special ladies of my life. My best wishes will always be with you two. May you two always be happy.
  • 💯My Parents: The greatest treasures of my life ever.

 

License:

Copyright (C) 2024 SKN Shukhan

Licensed under the Apache License, Version 2.0