Package jakarta.mail
Class Provider
- java.lang.Object
-
- jakarta.mail.Provider
-
public class Provider extends Object
The Provider is a class that describes a protocol implementation. The values typically 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Provider.Type
This inner class defines the Provider type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClassName()
Returns the name of the class that implements the protocol.String
getProtocol()
Returns the protocol supported by this Provider.Provider.Type
getType()
Returns the type of this Provider.String
getVendor()
Returns the name of the vendor associated with this implementation or null.String
getVersion()
Returns the version of this implementation or null if no version.String
toString()
Overrides Object.toString()
-
-
-
Constructor Detail
-
Provider
public Provider(Provider.Type type, String protocol, String classname, String vendor, 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.TRANSPORTprotocol
- valid protocol for the typeclassname
- class name that implements this protocolvendor
- optional string identifying the vendor (may be null)version
- optional implementation version string (may be null)- Since:
- JavaMail 1.4
-
-
Method Detail
-
getType
public Provider.Type getType()
Returns the type of this Provider.- Returns:
- the provider type
-
getProtocol
public String getProtocol()
Returns the protocol supported by this Provider.- Returns:
- the protocol
-
getClassName
public String getClassName()
Returns the name of the class that implements the protocol.- Returns:
- the class name
-
getVendor
public String getVendor()
Returns the name of the vendor associated with this implementation or null.- Returns:
- the vendor
-
getVersion
public String getVersion()
Returns the version of this implementation or null if no version.- Returns:
- the version
-
-