public class FixedMembershipToken extends AuthToken
The FixedMemberShipToken object predefines a list of IP addresses and ports that can join the group.
Configuration parameters for this example are shown below:
构造器和说明 |
---|
FixedMembershipToken() |
FixedMembershipToken(java.lang.String token) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
authenticate(AuthToken token,
Message msg)
This method should be implemented to perform the actual authentication of joining members.
|
java.lang.String |
getName()
Used to return the full package and class name of the implementation.
|
void |
readFrom(java.io.DataInput in)
Required to deserialize the object when read in from the wire
|
void |
setFixedMembersSeparator(java.lang.String value) |
void |
setMemberList(java.lang.String list) |
int |
size()
The size of the marshalled AuthToken
|
void |
writeTo(java.io.DataOutput out)
Required to serialize the object to pass across the wire
|
public FixedMembershipToken()
public FixedMembershipToken(java.lang.String token)
public java.lang.String getName()
AuthToken
public void setFixedMembersSeparator(java.lang.String value)
public boolean authenticate(AuthToken token, Message msg)
AuthToken
authenticate
在类中 AuthToken
token
- the token sent by the joinermsg
- the Message object containing the actual JOIN_REQpublic void setMemberList(java.lang.String list)
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
out
- java.io.IOException
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
in
- java.lang.Exception