Project JXTA

net.jxta.membership
Interface Authenticator

All Known Subinterfaces:
InteractiveAuthenticator

public interface Authenticator

An Authenticator is returned by the apply() to the Membership Service of a peergroup. The Membership When the authenticator has been completed it is returned to the Membership Service via the "Join" operation.

The mechanism for completing the authentication object is unique for each authentication method. (That's the whole point of writing a Membership Service). The only common operation is isReadyForJoin, which provides information as to whether you have completed the authenticator correctly.

See Also:
MembershipService, Credential, AuthenticationCredential

Method Summary
 AuthenticationCredential getAuthenticationCredential()
          Return the Authentication Credential associated with this authenticator, if any.
 String getMethodName()
          Returns the name of this authentication method.
 MembershipService getSourceService()
          Returns the service which generated this authenticator.
 boolean isReadyForJoin()
          Returns true if this Authenticator has been satisfied and is ready for submission to MembershipService.join(Authenticator).
 

Method Detail

getMethodName

public String getMethodName()
Returns the name of this authentication method. This should be the same name which was used in the Authentication credential.

Returns:
String containing the name of this authentication method.

getAuthenticationCredential

public AuthenticationCredential getAuthenticationCredential()
Return the Authentication Credential associated with this authenticator, if any.

Returns:
the AutheticationCredential which was provided to the MembershipService.apply(AuthenticationCredential).

getSourceService

public MembershipService getSourceService()
Returns the service which generated this authenticator. This is the service which provided this authenticator and the service which will accept this authenticator when the authenticator is completed.

Returns:
the MembershipService service associated with this authenticator.

isReadyForJoin

public boolean isReadyForJoin()
Returns true if this Authenticator has been satisfied and is ready for submission to MembershipService.join(Authenticator). Some authenticators may behave asynchronously and this method can be used to determine if the authentication process has completed.

This method provides no distinction between incomplete authentication and failed authentication.

Returns:
true if the authenticator object is complete and ready for submitting to the Membership Service service for MembershipService.join(Authenticator), otherwise false.
See Also:
MembershipService.join(Authenticator)

JXTA J2SE