Package com.fayupable.logged.core.port
Class NoOpClientInfoPort
java.lang.Object
com.fayupable.logged.core.port.NoOpClientInfoPort
- All Implemented Interfaces:
IClientInfoPort
A no-op
IClientInfoPort that always reports the caller as
unknown.
This implementation exists so that the core module remains fully
usable on its own, without requiring any adapter (for example
logged-spring, which resolves the caller through Spring Security or the
current HTTP request) on the classpath. Adapter modules are expected to
register their own IClientInfoPort implementation and override
this default; this class is the fallback when none is provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves an identifier describing who triggered the current invocation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.fayupable.logged.core.port.IClientInfoPort
resolveCallerIp
-
Constructor Details
-
NoOpClientInfoPort
public NoOpClientInfoPort()
-
-
Method Details
-
resolveCallerIdentity
Description copied from interface:IClientInfoPortResolves an identifier describing who triggered the current invocation.- Specified by:
resolveCallerIdentityin interfaceIClientInfoPort- Returns:
- a caller identity such as
"user:42"or"ip:203.0.113.10", or an implementation-defined placeholder such as"unknown"if no identity can be resolved
-