APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.security.sasl.digest

public final Class FactoryImpl

extends Object
implements SaslClientFactory, SaslServerFactory
Class Inheritance
All Implemented Interfaces
javax.security.sasl.SaslServerFactory, javax.security.sasl.SaslClientFactory
Imports
java.util.Map, javax.security.sasl.*, javax.security.auth.callback.CallbackHandler, com.sun.security.sasl.util.PolicyUtils

Client and server factory for DIGEST-MD5 SASL client/server mechanisms. See DigestMD5Client and DigestMD5Server for input requirements.
Authors
Jonathan Bruce, Rosanna Lee

Field Summary

Modifier and TypeField and Description
private static final int
private static final int[]
private static final String[]

Constructor Summary

AccessConstructor and Description
public
FactoryImpl()

Empty constructor.

Method Summary

Modifier and TypeMethod and Description
public SaslClient

Returns:

a new SaslClient; otherwise null if unsuccessful.
createSaslClient
(String[] mechs, String authorizationId, String protocol, String serverName, Map<String, ?> props, CallbackHandler cbh)

Implements javax.security.sasl.SaslClientFactory.createSaslClient.

Returns a new instance of the DIGEST-MD5 SASL client mechanism.

public SaslServer

Returns:

a new SaslServer; otherwise null if unsuccessful.
createSaslServer
(String mech, String protocol, String serverName, Map<String, ?> props, CallbackHandler cbh)

Implements javax.security.sasl.SaslServerFactory.createSaslServer.

Returns a new instance of the DIGEST-MD5 SASL server mechanism.

public String[]

Returns:

String[] {"DigestMD5"} if policies in env match those of this factory.
getMechanismNames
(Map<String, ?> env)

Implements javax.security.sasl.SaslClientFactory.getMechanismNames, javax.security.sasl.SaslServerFactory.getMechanismNames.

Returns the authentication mechanisms that this factory can produce.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DIGEST_MD5back to summary
private static final int DIGEST_MD5
mechPoliciesback to summary
private static final int[] mechPolicies
myMechsback to summary
private static final String[] myMechs

Constructor Detail

FactoryImplback to summary
public FactoryImpl()

Empty constructor.

Method Detail

createSaslClientback to summary
public SaslClient createSaslClient(String[] mechs, String authorizationId, String protocol, String serverName, Map<String, ?> props, CallbackHandler cbh) throws SaslException

Implements javax.security.sasl.SaslClientFactory.createSaslClient.

Returns a new instance of the DIGEST-MD5 SASL client mechanism.

Returns:SaslClient

a new SaslClient; otherwise null if unsuccessful.

Exceptions
SaslException:
If there is an error creating the DigestMD5 SASL client.
createSaslServerback to summary
public SaslServer createSaslServer(String mech, String protocol, String serverName, Map<String, ?> props, CallbackHandler cbh) throws SaslException

Implements javax.security.sasl.SaslServerFactory.createSaslServer.

Returns a new instance of the DIGEST-MD5 SASL server mechanism.

Returns:SaslServer

a new SaslServer; otherwise null if unsuccessful.

Exceptions
SaslException:
If there is an error creating the DigestMD5 SASL server.
getMechanismNamesback to summary
public String[] getMechanismNames(Map<String, ?> env)

Implements javax.security.sasl.SaslClientFactory.getMechanismNames, javax.security.sasl.SaslServerFactory.getMechanismNames.

Returns the authentication mechanisms that this factory can produce.

Returns:String[]

String[] {"DigestMD5"} if policies in env match those of this factory.