public final class InterceptorStackImpl extends java.lang.Object implements InterceptorStack
InterceptorStack
interface; localizes
error checking in one place.Constructor and Description |
---|
InterceptorStackImpl(org.apache.commons.logging.Log log,
ServicePoint sep,
java.lang.Object root) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getServiceExtensionPointId()
Return the full id of the service extension point for which
interceptors are being fabricated.
|
java.lang.Class |
getServiceInterface()
Returns the interface for the service; the same
as
ServicePoint.getServiceInterface() . |
org.apache.commons.logging.Log |
getServiceLog()
Returns the Log instance that should be used to log any information
about the service, or the construction of the service.
|
Module |
getServiceModule()
Returns the module which contains the service extension point.
|
java.lang.Object |
peek()
Returns the current top object on the stack.
|
void |
process(ServiceInterceptorContribution contribution)
Invoked to process the next interceptor contribution; these should
be processed in ascending order.
|
void |
push(java.lang.Object interceptor)
Pushes a new instance onto the stack.
|
java.lang.String |
toString() |
public InterceptorStackImpl(org.apache.commons.logging.Log log, ServicePoint sep, java.lang.Object root)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getServiceExtensionPointId()
InterceptorStack
getServiceExtensionPointId
in interface InterceptorStack
public Module getServiceModule()
InterceptorStack
getServiceModule
in interface InterceptorStack
public java.lang.Class getServiceInterface()
InterceptorStack
ServicePoint.getServiceInterface()
.getServiceInterface
in interface InterceptorStack
public java.lang.Object peek()
InterceptorStack
peek
in interface InterceptorStack
public void push(java.lang.Object interceptor)
InterceptorStack
InterceptorStack.peek()
, and should
implement the service extension point's interface.
The stack checks that the interceptor is not null, and that the interceptor implements the service interface.
push
in interface InterceptorStack
public void process(ServiceInterceptorContribution contribution)
public org.apache.commons.logging.Log getServiceLog()
InterceptorStack
getServiceLog
in interface InterceptorStack