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()
AuthToken
public void setFixedMembersSeparator(java.lang.String value)
public boolean authenticate(AuthToken token, Message msg)
authenticate
in class AuthToken
token
- 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.UnknownHostException
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
Streamable
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
Streamable
java.lang.Exception
Copyright © 1998-2020 Red Hat. All Rights Reserved.