|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.membership.Membership
The membership policy allows a peer to establish an identity within a peer group. Once an identity has been a established a credential is available which allows the peer to prove that it rightfully has that identity. Identities are used to services to determine the capabilities which should be offered to peers. When a peer group is instantiated on a peer the membership policy for that peer group establishes a default temporary identity for the peer within the peergroup. This identity, by convention, only allows the peer to establish their true identity. The sequence for establishing an indentity for a peer within a peer group is as follows: Apply : The peer provides the membership policy an initial credential which may be used by the policy to determine which method of authentication is to be used to establish the identity of this peer. If the policy allows authentication using the requested mechanism then an appropriate authenticator object is returned. The peer group instance is assumsed to know how to interact with the authentication object (remember that it requested the authentication method earlier in the apply process). Join : The completed authenticator is returned to the Membership policy and the identity of this peer is adjusted based on the new credential available from the authenticator. Until the "Join" is completed the indentity of the peer remains as it was. Resign : Whatever existing identity that is established for this peer is discarded and the current identity reverts to the "nobody" identity. There is also the question of the duration of validity of the Credential objects returned.
Constructor Summary | |
Membership()
|
Method Summary | |
abstract Authenticator |
apply(AuthenticationCredential application)
Request the necessary credentials to join the group with which this policy is associated. |
abstract java.util.Enumeration |
getAuthCredentials()
Returns the current credentials for this peer. |
abstract java.util.Enumeration |
getCurrentCredentials()
Returns the current credentials for this peer. |
Service |
getInterface()
Policy objects are not manipulated directly to protect usage of the policy. |
java.lang.String |
getName()
Returns the name of the associated policy. |
abstract Credential |
join(Authenticator authenticated)
Join the group by virtue of the completed authentication provided. |
abstract Credential |
makeCredential(Element element)
Given a fragment of a StructuredDocument, reconstruct a Credential object from that fragment. |
abstract void |
resign()
Leave the group to which this policy is attached. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Membership()
Method Detail |
public final java.lang.String getName()
public Service getInterface()
public abstract Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException
application
- The authenticationCredential associated with this
membership application. See
AuthenticationCredential
for more information.public abstract Credential join(Authenticator authenticated) throws PeerGroupException
authenticated
- the completed authentication.public abstract void resign() throws PeerGroupException
public abstract java.util.Enumeration getCurrentCredentials() throws PeerGroupException
public abstract java.util.Enumeration getAuthCredentials() throws PeerGroupException
public abstract Credential makeCredential(Element element) throws PeerGroupException, java.lang.Exception
element
- The StructuredDocument fragment to use for building the
credential.
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |