net.sf.eBus.client.sysmessages.McastSubscribeMessage Maven / Gradle / Ivy
The newest version!
//
// Copyright 2020 Charles W. Rapp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package net.sf.eBus.client.sysmessages;
import java.io.Serializable;
import net.sf.eBus.messages.ESystemMessage;
/**
* A {@code EMulticastSubscriber} multicasts this message after
* joining the multicast group. The purpose is to request that
* existing {@code EMulticastPublisher}(s) transmit their
* currently supported message keys and the message key feed
* state. These responses are sent directly to the multicast
* subscriber and not multicast.
*
* This message has no fields.
*
*
* @author Charles W. Rapp
*/
public final class McastSubscribeMessage
extends ESystemMessage
implements Serializable
{
//---------------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Constants.
//
/**
* Serialization version identifier.
*/
private static final long serialVersionUID = 0x050500L;
//---------------------------------------------------------------
// Member methods.
//
//-----------------------------------------------------------
// Constructors.
//
/**
* Creates a new multicast subscribe message based on the
* builder configuration.
* @param builder contains message configuration.
*/
public McastSubscribeMessage(final Builder builder)
{
super (builder);
} // end of McastSubscribeMessage(Builder)
//
// end of Constructors.
//-----------------------------------------------------------
/**
* Returns a new instance of {@code McastSubscribeMessage}
* builder.
* @return message builder instance.
*/
public static Builder builder()
{
return (new Builder());
} // end of builder()
//---------------------------------------------------------------
// Inner classes.
//
public static final class Builder
extends ESystemMessage.Builder
{
//-----------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Member methods.
//
//-------------------------------------------------------
// Constructors.
//
private Builder()
{
super (McastSubscribeMessage.class);
} // end of Builder()
//
// end of Constructors.
//-------------------------------------------------------
//-------------------------------------------------------
// Builder Method Overrides.
//
@Override
protected McastSubscribeMessage buildImpl()
{
return (new McastSubscribeMessage(this));
} // end of buildImpl()
//
// end of Builder Method Overrides.
//-------------------------------------------------------
} // end of class Builder
} // end of class McastSubscribeMessage