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.Objectpublic java.lang.String getServiceExtensionPointId()
InterceptorStackgetServiceExtensionPointId in interface InterceptorStackpublic Module getServiceModule()
InterceptorStackgetServiceModule in interface InterceptorStackpublic java.lang.Class getServiceInterface()
InterceptorStackServicePoint.getServiceInterface().getServiceInterface in interface InterceptorStackpublic java.lang.Object peek()
InterceptorStackpeek in interface InterceptorStackpublic void push(java.lang.Object interceptor)
InterceptorStackInterceptorStack.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 InterceptorStackpublic void process(ServiceInterceptorContribution contribution)
public org.apache.commons.logging.Log getServiceLog()
InterceptorStackgetServiceLog in interface InterceptorStack