|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MembershipService
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.
The sequence for associating an identity 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. |
Credential
,
AuthenticationCredential
Field Summary | |
---|---|
static String |
ADD_CREDENTIAL_PROPERTY
Property name for credential addition bound property. |
static String |
DEFAULT_CREDENTIAL_PROPERTY
Property name for the default credential bound property. |
Fields inherited from interface net.jxta.platform.Module |
---|
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_DISABLED, 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<AuthenticationCredential> |
getAuthCredentials()
Deprecated. This interface is being removed in favour of individual Credentials providing their AuthenticationCredential as appropriate. |
Enumeration<Credential> |
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 |
Field Detail |
---|
static final String DEFAULT_CREDENTIAL_PROPERTY
static final String ADD_CREDENTIAL_PROPERTY
Method Detail |
---|
Authenticator apply(AuthenticationCredential application) throws PeerGroupException, ProtocolNotSupportedException
application
- The authentication Credential associated with this
membership application. See
AuthenticationCredential
for more information.
PeerGroupException
- Thrown in the event of errors.
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.void resign() throws PeerGroupException
join()
operations.
PeerGroupException
- Thrown in the event of errors.Credential getDefaultCredential() throws PeerGroupException
null
if there is no
current default.
PeerGroupException
- Thrown in the event of errors.Enumeration<Credential> getCurrentCredentials() throws PeerGroupException
PeerGroupException
- Thrown in the event of errors.@Deprecated Enumeration<AuthenticationCredential> getAuthCredentials() throws PeerGroupException
PeerGroupException
- Thrown in the event of errors.Credential makeCredential(Element element) throws PeerGroupException, Exception
element
- The StructuredDocument fragment to use for building the
credential.
PeerGroupException
- Thrown in the event of errors.
Exception
- Thrown in the event of errors.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
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |