FileDocCategorySizeDatePackage
Provider.javaAPI DocGlassfish v2 API4552Mon May 14 15:28:48 BST 2007javax.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.
version
1.11, 07/05/04
author
Max Spivak
author
Bill Shannon

Fields Summary
private Type
type
private String
protocol
private String
className
private String
vendor
private String
version
Constructors Summary
public 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.

param
type Type.STORE or Type.TRANSPORT
param
protocol valid protocol for the type
param
classname class name that implements this protocol
param
vendor optional string identifying the vendor (may be null)
param
version optional implementation version string (may be null)
since
JavaMail 1.4

	this.type = type;
	this.protocol = protocol;
	this.className = classname;
	this.vendor = vendor;
	this.version = version;
    
Methods Summary
public java.lang.StringgetClassName()
Returns name of the class that implements the protocol

	return className;
    
public java.lang.StringgetProtocol()
Returns the protocol supported by this Provider

	return protocol;
    
public javax.mail.Provider$TypegetType()
Returns the type of this Provider

	return type;
    
public java.lang.StringgetVendor()
Returns name of vendor associated with this implementation or null

	return vendor;
    
public java.lang.StringgetVersion()
Returns version of this implementation or null if no version

	return version;
    
public java.lang.StringtoString()
Overrides Object.toString()

	String s = "javax.mail.Provider[" + type + "," +
		    protocol + "," + className;

	if (vendor != null)
	    s += "," + vendor;

	if (version != null)
	    s += "," + version;

	s += "]";
	return s;