|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MembershipService
The membership service allows a peer to establish an identity within a peer group. Identities are used by services and applications to determine the capabilities available to peers. A peer have any number of identities at one time. Once an identity has been established a credential object is available which allows the peer to prove that it rightfully has that identity.
When a peer group is instantiated on a peer the membership service 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 associating an indentity with a peer within a peer group is as follows:Apply | An application or service provides the membership service with an
initial credential which may be used by the membership service to determine
the method of authentication to be used for establishing the identity.
If the membership service implementations allows authentication using the
requested mechanism then an Authenticator object is returned.
|
Join | The application or service completes the authenticator. This may involve presenting a user interface, completing challenges, etc. How the authenticator is completed depends on the type of membership service and authenticator in use. Once completed, the authenticator is returned to the membership service. If the authenticator has been correctly completed, a new credential for the new identity will be available to the peer from the membership service. |
Resign | Whenever the application or service no longer wishes to no longer use the identities it has claimed, it may resign from the peergroup. This will cause any identity credentials held by the membership service to discarded and the list of current identities reverts to contain only the default "nobody" identity. |
Credential
,
AuthenticationCredential
Field Summary |
---|
Fields inherited from interface net.jxta.platform.Module |
---|
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a listener |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a listener. |
Authenticator |
apply(AuthenticationCredential application)
Request the necessary credentials to join the group with which this service is associated. |
Enumeration |
getAuthCredentials()
Returns the current credentials for this peer. |
Enumeration |
getCurrentCredentials()
Returns the current credentials for this peer. |
Credential |
getDefaultCredential()
Returns the default credential for this peer. |
Credential |
join(Authenticator authenticated)
Join the group by virtue of the completed authentication provided. |
Credential |
makeCredential(Element element)
Given a fragment of a StructuredDocument, reconstruct a Credential object from that fragment. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a listener |
void |
resign()
Resign all credentials which were previously gained through prior join() operations. |
Methods inherited from interface net.jxta.service.Service |
---|
getImplAdvertisement, getInterface |
Methods inherited from interface net.jxta.platform.Module |
---|
init, startApp, stopApp |
Method Detail |
---|
Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException
application
- The authenticationCredential associated with this
membership application. See
AuthenticationCredential
for more information.
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.
ProtocolNotSupportedException
- if the authentication method requested
in the application is not supported by this service.Credential join(Authenticator authenticated) throws PeerGroupException
authenticated
- the completed authentication.
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.void resign() throws PeerGroupException
join()
operations.
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.Credential getDefaultCredential() throws PeerGroupException
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.Enumeration getCurrentCredentials() throws PeerGroupException
join()
or after resign()
are called, this
enumeration will consist of a single element, a default credential
which is usually has the identity "nobody". This credential always
exists, but likely offers few, if any, privledges within this group.
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.Enumeration getAuthCredentials() throws PeerGroupException
AuthenticationCredential
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.Credential makeCredential(Element element) throws PeerGroupException, Exception
element
- The StructuredDocument fragment to use for building the
credential.
PeerGroupException
- Thrown in the event of errors. This exception
spec is currently a placeholder and needs to be narrowed.
Exception
- Thrown in the event of errors. This exception spec is
currently a placeholder and needs to be narrowed.void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the listenervoid addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
defaultCredential
addCredential
propertyName
- the property to watchlistener
- the listenervoid removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listenervoid removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- the property which was watchedlistener
- the listener
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |