← ClaudeAtlas

boxlang-core-dev-interceptorslisted

Use this skill when creating BoxLang interceptors: Observer/Intercepting Filter patterns, interceptor pools, BoxLang class vs Java interceptors, lambda interceptors, registration via BIFs/InterceptorService/ModuleConfig, interception points, and announcing custom events.
ortus-boxlang/skills · ★ 0 · DevOps & Infrastructure · score 58
Install: claude install-skill ortus-boxlang/skills
# BoxLang Interceptors ## Overview BoxLang's interceptor system implements the **Observer** and **Intercepting Filter** design patterns. Interceptors listen for named events (interception points) announced by the runtime, modules, or application code. They enable cross-cutting concerns like logging, security, AOP, routing, and content manipulation without modifying core code. ## Interceptor Pools Three pools exist in the runtime. Each pool is an independent event emitter: | Pool | Scope | Use Case | |------|-------|---------| | **Global Runtime** | Entire BoxLang process | Module events, parse events, global AOP | | **Application Request Listener** | Per-application request lifecycle | Auth, routing, request logging | | **CacheProviders** | Per cache instance | Cache event hooks | ## Creating a BoxLang Class Interceptor Method names in the class directly correspond to interception point names: ```boxlang // interceptors/RequestLogger.bx class { // Auto-injected by the runtime property name="name" setter="false" property name="properties" setter="false" property name="log" setter="false" // module logger property name="interceptorService" setter="false" property name="boxRuntime" setter="false" property name="moduleRecord" setter="false" // if module-based /** * Called when the interceptor is registered. * Use this to validate properties and set up resources. */ functio