A token representing the membership of an Internet Protocol (IP) multicast group.
A membership key may represent a membership to receive all datagrams sent to the group, or it may be source-specific, meaning that it represents a membership that receives only datagrams from a specific source address. Whether or not a membership key is source-specific may be determined by invoking its {@link #sourceAddress() sourceAddress} method.
A membership key is valid upon creation and remains valid until the membership is dropped by invoking the {@link #drop() drop} method, orthe channel is closed. The validity of the membership key may be tested by invoking its {@link #isValid() isValid} method.
Where a membership key is not source-specific and the underlying operation system supports source filtering, then the {@link #block block} and {@link #unblock unblock} methods can be used to block or unblock multicast datagramsfrom particular source addresses.
@see MulticastChannel
@since 1.7