Top Description Inners Fields Constructors Methods
javax.mail

public Class Provider

extends Object
Class Inheritance

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.
Authors
Max Spivak, Bill Shannon

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Provider.Type

This inner class defines the Provider type.

Field Summary

Modifier and TypeField and Description
private String
private String
private Provider.Type
private String
private String

Constructor Summary

AccessConstructor and Description
public
Provider(Provider.Type
Type.STORE or Type.TRANSPORT
type
,
String
valid protocol for the type
protocol
,
String
class name that implements this protocol
classname
,
String
optional string identifying the vendor (may be null)
vendor
,
String
optional implementation version string (may be null)
version
)

Create a new provider of the specified type for the specified protocol.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the class name
getClassName
()

Returns the name of the class that implements the protocol.

public String

Returns:

the protocol
getProtocol
()

Returns the protocol supported by this Provider.

public Provider.Type

Returns:

the provider type
getType
()

Returns the type of this Provider.

public String

Returns:

the vendor
getVendor
()

Returns the name of the vendor associated with this implementation or null.

public String

Returns:

the version
getVersion
()

Returns the version of this implementation or null if no version.

public String
toString()

Overrides java.lang.Object.toString.

Overrides Object.toString()
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

classNameback to summary
private String className
protocolback to summary
private String protocol
typeback to summary
private Provider.Type type
vendorback to summary
private String vendor
versionback to summary
private String version

Constructor Detail

Providerback to summary
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:Provider.Type

Type.STORE or Type.TRANSPORT

protocol:String

valid protocol for the type

classname:String

class name that implements this protocol

vendor:String

optional string identifying the vendor (may be null)

version:String

optional implementation version string (may be null)

Since
JavaMail 1.4

Method Detail

getClassNameback to summary
public String getClassName()

Returns the name of the class that implements the protocol.

Returns:String

the class name

getProtocolback to summary
public String getProtocol()

Returns the protocol supported by this Provider.

Returns:String

the protocol

getTypeback to summary
public Provider.Type getType()

Returns the type of this Provider.

Returns:Provider.Type

the provider type

getVendorback to summary
public String getVendor()

Returns the name of the vendor associated with this implementation or null.

Returns:String

the vendor

getVersionback to summary
public String getVersion()

Returns the version of this implementation or null if no version.

Returns:String

the version

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Overrides Object.toString()

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override
javax.mail back to summary

public Class Provider.Type

extends Object
Class Inheritance

This inner class defines the Provider type. Currently, STORE and TRANSPORT are the only two provider types supported.

Field Summary

Modifier and TypeField and Description
public static final Provider.Type
public static final Provider.Type
private String

Constructor Summary

AccessConstructor and Description
private
Type(String type)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

STOREback to summary
public static final Provider.Type STORE
TRANSPORTback to summary
public static final Provider.Type TRANSPORT
typeback to summary
private String type

Constructor Detail

Typeback to summary
private Type(String type)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override