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:
| Constructor and Description | 
|---|
FixedMembershipToken()  | 
FixedMembershipToken(java.lang.String token)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
authenticate(AuthToken token,
            Message msg)
Check if I'm in memberList, too 
 | 
java.lang.String | 
getName()
Used to return the full package and class name of the implementation. 
 | 
boolean | 
isInMembersList(IpAddress sender)  | 
static boolean | 
match(IpAddress sender,
     java.net.InetSocketAddress addr)  | 
void | 
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream
 Note that the input stream must not be closed 
 | 
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)
Write the entire state of the current object (including superclasses) to outstream. 
 | 
public FixedMembershipToken()
public FixedMembershipToken(java.lang.String token)
public java.lang.String getName()
AuthTokenpublic void setFixedMembersSeparator(java.lang.String value)
public boolean authenticate(AuthToken token, Message msg)
authenticate in class AuthTokentoken - the token sent by the joinermsg - the Message object containing the actual JOIN_REQpublic boolean isInMembersList(IpAddress sender)
public static boolean match(IpAddress sender, java.net.InetSocketAddress addr)
public void setMemberList(java.lang.String list)
                   throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
Streamablejava.lang.Exceptionpublic void readFrom(java.io.DataInput in)
              throws java.lang.Exception
Streamablejava.lang.ExceptionCopyright © 1998-2020 Red Hat. All Rights Reserved.