Package org.jboss.as.ee.component
Class ViewConfiguration
java.lang.Object
org.jboss.as.ee.component.ViewConfiguration
A configuration of a component view.
- Author:
- David M. Lloyd, Stuart Douglas
-
Constructor Summary
ConstructorsConstructorDescriptionViewConfiguration(Class<?> viewClass, ComponentConfiguration componentConfiguration, org.jboss.msc.service.ServiceName viewServiceName, org.jboss.invocation.proxy.ProxyFactory<?> proxyFactory) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAsyncMethod(Method method) Marks a method on the view as asynchronousvoidaddClientInterceptor(Method method, org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client interceptor to the given methodvoidaddClientInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client interceptor factory to all methods of a viewvoidaddClientPostConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client post construct interceptorvoidaddClientPreDestroyInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client pre-destroy interceptorvoidaddViewInterceptor(Method method, org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a view interceptor to the given methodvoidaddViewInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds an interceptor factory to all methods of a viewGets all async methods for the viewGet the binding configurations for this view.List<org.jboss.invocation.InterceptorFactory>getClientInterceptors(Method method) Get the client interceptors for a method.List<org.jboss.invocation.InterceptorFactory>Get the post-construct interceptors for client proxy instances.List<org.jboss.invocation.InterceptorFactory>Get the pre-destroy interceptors for client proxy instances.Get the component configuration for this view.retrieves private dataorg.jboss.invocation.proxy.ProxyFactory<?>Get the client proxy factory to use to construct proxy instances.Class<?>Get the view class.List<org.jboss.invocation.InterceptorFactory>getViewInterceptors(Method method) Get the view interceptors for a method.org.jboss.msc.service.ServiceNameGet the view service name for this view.<T> voidputPrivateData(Class<T> type, T data) Attaches arbitrary private data to this view instancevoidsetViewInstanceFactory(ViewInstanceFactory viewInstanceFactory)
-
Constructor Details
-
ViewConfiguration
public ViewConfiguration(Class<?> viewClass, ComponentConfiguration componentConfiguration, org.jboss.msc.service.ServiceName viewServiceName, org.jboss.invocation.proxy.ProxyFactory<?> proxyFactory) Construct a new instance.- Parameters:
viewClass- the view classcomponentConfiguration- the associated component configurationviewServiceName- the service name of this viewproxyFactory- the proxy factory to use to locally construct client proxy instances
-
-
Method Details
-
getComponentConfiguration
Get the component configuration for this view.- Returns:
- the component configuration
-
getViewServiceName
public org.jboss.msc.service.ServiceName getViewServiceName()Get the view service name for this view.- Returns:
- the view service name
-
getViewInterceptors
Get the view interceptors for a method. These interceptors are run sequentially on the "server side" of an invocation. The interceptor factories are used every time a new view instance is constructed, called with a new factory context each time. The factory may return the same interceptor instance or a new interceptor instance as appropriate.- Parameters:
method- the method to look up- Returns:
- the interceptors for this method
-
addViewInterceptor
public void addViewInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds an interceptor factory to all methods of a view- Parameters:
interceptorFactory- The factory to addpriority- The interceptor order
-
addViewInterceptor
public void addViewInterceptor(Method method, org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a view interceptor to the given method- Parameters:
method- The method to addinterceptorFactory- The interceptor factorypriority- The priority
-
getClientInterceptors
Get the client interceptors for a method. These interceptors are run sequentially on the "client side" of an invocation. The interceptor factories are used every time a new client proxy instance is constructed, called with a new factory context each time. The factory may return the same interceptor instance or a new interceptor instance as appropriate.- Parameters:
method- the method to look up- Returns:
- the interceptors for this method
-
addClientInterceptor
public void addClientInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client interceptor factory to all methods of a view- Parameters:
interceptorFactory- The factory to addpriority- The interceptor order
-
addClientInterceptor
public void addClientInterceptor(Method method, org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client interceptor to the given method- Parameters:
method- The method to addinterceptorFactory- The interceptor factorypriority- The priority
-
getClientPostConstructInterceptors
Get the post-construct interceptors for client proxy instances. This method should only be called after all interceptors have been added.- Returns:
- the interceptors
-
addClientPostConstructInterceptor
public void addClientPostConstructInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client post construct interceptor- Parameters:
interceptorFactory- The interceptorpriority- The interceptor order
-
getClientPreDestroyInterceptors
Get the pre-destroy interceptors for client proxy instances. This method should only be called after all interceptors have been added.- Returns:
- the interceptors
-
addClientPreDestroyInterceptor
public void addClientPreDestroyInterceptor(org.jboss.invocation.InterceptorFactory interceptorFactory, int priority) Adds a client pre-destroy interceptor- Parameters:
interceptorFactory- The interceptorpriority- The interceptor order
-
getProxyFactory
public org.jboss.invocation.proxy.ProxyFactory<?> getProxyFactory()Get the client proxy factory to use to construct proxy instances.- Returns:
- the proxy factory
-
getBindingConfigurations
Get the binding configurations for this view.- Returns:
- the binding configurations
-
getViewClass
Get the view class.- Returns:
- the view class
-
getAsyncMethods
Gets all async methods for the view- Returns:
- The async methods
-
addAsyncMethod
Marks a method on the view as asynchronous- Parameters:
method- The method
-
getViewInstanceFactory
-
setViewInstanceFactory
- Parameters:
viewInstanceFactory- The instance factory that is used to create the view instances
-
putPrivateData
Attaches arbitrary private data to this view instance- Parameters:
type- The type of datadata- The data
-
getPrivateData
retrieves private data -
getDependencies
-
getViewToComponentMethodMap
-