getProvider
is used to get an instace of a provider specified by a classname. This provider connects to the jvmai-implementation and tries to get references to the aspect- and info-interface. Applications can then retrieve this references by calling getAspectInterface()
and getInfoInterface()
.
@version $Revision: 1.2 $
@author Stephan Markwalder
To define tracepoints, users must extend this interface and then use a {@code ProviderFactory} to create an instance of thenewly-defined interface. Each method in the defined interface represents a tracepoint (or probe), which can be triggered by calling the associated method on the returned instance.
This interface also contains a {@code getProbe()} method, which can beused to get direct handles to the {@code Probe} objects themselves.{@code Probe} objects can be triggered manually, or they can be queried tocheck their state.
When an application has finished triggering probes, it should call {@code dispose()} to free up any system resources associated with theProvider.
All methods declared in a subclass of this interface should have a {@code void} return type. Methods can have parameters, and when called thevalues of the arguments will be passed to the tracing implementation. If any methods do not have a {@code void} return type, an{@code java.lang.IllegalArgumentException} will be thrown when theprovider is registered. @since 1.7
Each provider has a name and a version number, and is configured in each runtime it is installed in.
See The Provider Class in the "Java Cryptography Architecture API Specification & Reference" for information about how a particular type of provider, the cryptographic service provider, works and is installed. However, please note that a provider can be used to implement any security service in Java that uses a pluggable architecture with a choice of implementations that fit underneath.
Some provider implementations may encounter unrecoverable internal errors during their operation, for example a failure to communicate with a security token. A {@link ProviderException} should be used to indicate such errors.
The service type Provider
is reserved for use by the security framework. Services of this type cannot be added, removed, or modified by applications. The following attributes are automatically placed in each Provider object:
Name | Value |
---|---|
Provider.id name | String.valueOf(provider.getName()) |
Provider.id version | String.valueOf(provider.getVersion()) |
Provider.id info | String.valueOf(provider.getInfo()) |
Provider.id className | provider.getClass().getName() |
package example; import javax.enterprise.inject.*; import javax.servlet.*; public class MyServlet extends GenericServlet { {@link javax.enterprise.inject.Obtains @Obtains} {@literal @Instance}<MyBean> _beanFactory; public void service(ServletRequest req, ServletResponse res) { MyBean bean = _beanFactory.get(); } }
@see javax.event.Event
Service endpoints may implement the Provider
interface as a dynamic alternative to an SEI.
Implementations are required to support Provider<Source>
, Provider<SOAPMessage>
and Provider<DataSource>
, depending on the binding in use and the service mode.
The ServiceMode
annotation can be used to control whether the Provider
instance will receive entire protocol messages or just message payloads.
@since JAX-WS 2.0
@see javax.xml.transform.Source
@see javax.xml.soap.SOAPMessage
@see javax.xml.ws.ServiceMode
ServiceDelegate
and Endpoint
objects. @since JAX-WS 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|