Skip to content

Releases: rpamis/chainlet

1.0.3

Choose a tag to compare

@benym benym released this 01 Feb 09:36
54242c7

🎉Chainlet v1.0.3 Release Notes

Core Features

🐛 Bug fix

  • Modified the InstanceOfCache caching mechanism to use a concatenated string of class names as the cache key, avoiding cache overwriting.
  • Optimized the fallback method check in FallbackResolver, adding a null name check and throwing an exception.
  • Prevents execution from continuing when the fallback method is null, improving the stability of fallback calls.
  • Added exception imports to support the chain exception throwing mechanism.

🧪 Test enhancement

  • Add a large number of unit tests to cover the core class of chain processing.

1.0.2

Choose a tag to compare

@benym benym released this 01 Feb 07:12

🎉Chainlet(old: rpamis-chain) v1.0.2 Release Notes

Core Features

⭐ Multiple Types of Responsibility Chains

  • Serial Chain: Execute handlers in sequence
  • Parallel Chain: Execute handlers concurrently

❄️ Multiple Execution Strategies

  • Full Execution Strategy: Execute all handlers regardless of results
  • Fast Return Strategy: Return immediately when any handler succeeds
  • Fast Failed Strategy: Return immediately when any handler fails
  • Custom Strategy Support: Implement your own execution strategies
  • SPI Extension: Extensible strategy architecture

📍 Fallback Methods

  • Interface Fallback:
    • Local fallback for individual handlers
    • Global fallback for entire chain
  • Annotation Fallback:
    • @Fallback annotation with configurable methods
    • Flexible fallback class specification

⛓️ Fluent API

  • Method Chain Pattern: Type-safe fluent interface
  • Fixed Declaration Path: createChain -> chain/parallelChain -> addHandler -> strategy/globalFallback -> build
  • Prevents Misconfiguration: Ensures handlers are added before building

❤️ Core Entities

  • CompleteChainResult: Comprehensive result with verification methods
  • ChainHandlerContext: Rich context with handler, processed and extended data
  • Fallback Contexts: Dedicated contexts for local and global fallbacks
  • Strategy Context: Execution strategy context with chain state

✨ Advanced Features

  • Compile-time Generation: Experimental annotation processor for custom chain types
  • Extensible Architecture: SPI-based extension points
  • Type Reference Support: Safe generic type handling with ChainTypeReference

🧪 Experimental Features

  • Annotation Processing: Code generation for custom chain builders
  • Custom Chain Extensions: Define new chain types with @ChainBuilder and @ChainBuilderService

🐕‍🦺 Developer Experience

  • IDEA Plugin Support: Dynamic compilation API prompts
  • Lombok-style Integration: Seamless IDE integration without manual compilation

1.0.0

Choose a tag to compare

@benym benym released this 31 Jan 13:18

🎉 rpamis-chain 1.0.0 Official Release

Project Introduction
rpamis-chain​ is a lightweight, highly extensible responsibility chain pattern framework that provides various built-in chain forms and execution strategies to help developers quickly build flexible business processing flows.

🚀 Core Features

1. Foundation Architecture

Chain Pipeline: Quickly create business processing chains by extending AbstractChainPipeline
Chain Handlers: Define business processing units by implementing ChainHandlerinterface
Generic Support: Supports any type of data transmission within the processing chain

2. Built-in Execution Strategies

FullExecutionStrategy: Default strategy, executes all handlers regardless of success or failure
FastReturnStrategy: Returns immediately when any handler succeeds, skipping subsequent handlers
FastFailedStrategy: Returns immediately when any handler fails, skipping subsequent handlers

3. Result Handling

CompleteChainResult: Provides aggregated execution results of the entire responsibility chain
Individual Handler Result Query: Supports querying specific handler results by handler class
Exception Handling: Unified ChainExceptionhandling mechanism

📦 Quick Start

Add Dependency

<dependency>
    <groupId>com.rpamis</groupId>
    <artifactId>rpamis-chain</artifactId>
    <version>1.0.0</version>
</dependency>

🎯 Use Cases

Request validation flows (parameter validation, permission verification, business rule checks)
Data processing pipelines (data cleaning, transformation, validation)
Workflow engines (order processing, approval workflows)
Any multi-step business processing scenario requiring decoupling

Support JDK version

JDK8 +