Package org.jgroups.auth
Class FixedMembershipToken
java.lang.Object
org.jgroups.auth.AuthToken
org.jgroups.auth.FixedMembershipToken
- All Implemented Interfaces:
Streamable
The FixedMemberShipToken object predefines a list of IP addresses and ports that can join the group.
Configuration parameters for this example are shown below:
- fixed_members_value (required) = List of IP addresses and ports (optional) - ports must be seperated by a '/' e.g. 127.0.0.1/1010*127.0.0.1/4567
- fixed_members_seperator (required) = The seperator used between IP addresses - e.g. *
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate final List<InetSocketAddress> private String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticate(AuthToken token, Message msg) Check if I'm in memberList, toogetName()Used to return the full package and class name of the implementation.booleanisInMembersList(IpAddress sender) static booleanmatch(IpAddress sender, InetSocketAddress addr) voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedvoidsetFixedMembersSeparator(String value) voidsetMemberList(String list) intsize()The size of the marshalled AuthTokenvoidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
memberList
-
token
-
fixed_members_seperator
-
-
Constructor Details
-
FixedMembershipToken
public FixedMembershipToken() -
FixedMembershipToken
-
-
Method Details
-
getName
Description copied from class:AuthTokenUsed to return the full package and class name of the implementation. This is used by the AUTH protocol to create an instance of the implementation. -
setFixedMembersSeparator
-
authenticate
Check if I'm in memberList, too- Specified by:
authenticatein classAuthToken- Parameters:
token- the token sent by the joinermsg- the Message object containing the actual JOIN_REQ- Returns:
- true if authenticaion passed or false if it failed.
-
isInMembersList
-
match
-
setMemberList
- Throws:
UnknownHostException
-
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Throws:
IOException
-
readFrom
Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
IOException
-
size
public int size()Description copied from class:AuthTokenThe size of the marshalled AuthToken
-