- java.lang.Object
- 
- jakarta.mail.Provider
 
- 
 public class Provider extends java.lang.ObjectThe Provider is a class that describes a protocol implementation. TheSessionsupports configuring providers using the Java SEServiceLoadermechanism. As an alternative the values could come from the javamail.providers and javamail.default.providers resource files. An application may also create and register a Provider object to dynamically add support for a new provider.- Author:
- Max Spivak, Bill Shannon
- See Also:
- Session
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classProvider.TypeThis inner class defines the Provider type.
 - 
Constructor SummaryConstructors Constructor Description Provider(Provider.Type type, java.lang.String protocol, java.lang.String classname, java.lang.String vendor, java.lang.String version)Create a new provider of the specified type for the specified protocol.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClassName()Returns the name of the class that implements the protocol.java.lang.StringgetProtocol()Returns the protocol supported by this Provider.Provider.TypegetType()Returns the type of this Provider.java.lang.StringgetVendor()Returns the name of the vendor associated with this implementation or null.java.lang.StringgetVersion()Returns the version of this implementation or null if no version.java.lang.StringtoString()Overrides Object.toString()
 
- 
- 
- 
Constructor Detail- 
Providerpublic Provider(Provider.Type type, java.lang.String protocol, java.lang.String classname, java.lang.String vendor, java.lang.String version) Create a new provider of the specified type for the specified protocol. The specified class implements the provider.- Parameters:
- type- Type.STORE or Type.TRANSPORT
- protocol- valid protocol for the type
- classname- class name that implements this protocol
- vendor- optional string identifying the vendor (may be null)
- version- optional implementation version string (may be null)
 
 
- 
 - 
Method Detail- 
getTypepublic Provider.Type getType() Returns the type of this Provider.- Returns:
- the provider type
 
 - 
getProtocolpublic java.lang.String getProtocol() Returns the protocol supported by this Provider.- Returns:
- the protocol
 
 - 
getClassNamepublic java.lang.String getClassName() Returns the name of the class that implements the protocol.- Returns:
- the class name
 
 - 
getVendorpublic java.lang.String getVendor() Returns the name of the vendor associated with this implementation or null.- Returns:
- the vendor
 
 - 
getVersionpublic java.lang.String getVersion() Returns the version of this implementation or null if no version.- Returns:
- the version
 
 - 
toStringpublic java.lang.String toString() Overrides Object.toString()- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-