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 #getSourceAddress} method.
A membership key is valid upon creation and remains valid until the membership is dropped by invoking the {@link #drop} method, or thechannel is closed. The validity of the membership key may be tested by invoking its {@link #isValid} method.
Where a membership key is not source specific and the underlying operation system supports source filtering, then the {@link #block} and{@link #unblock} methods can be used to block or unblock multicastpackets from particular source addresses. @see MulticastChannel
|
|
|
|