net.sf.eBusx.monitor.MonitoredObjectRequest Maven / Gradle / Ivy
//
// Copyright 2012, 2013, 2016, 2019 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.eBusx.monitor;
import java.io.Serializable;
import net.sf.eBus.messages.EReplyInfo;
import net.sf.eBus.messages.ERequestMessage;
/**
* Requests the {@link MonitorId}s of those objects within the
* eBus environment available for monitoring. The request message
* subject is {@link Monitor#MONITOR_REQUEST}.
*
* @author Charles Rapp
*/
@EReplyInfo (replyMessageClasses = {MonitoredObjectReply.class})
public final class MonitoredObjectRequest
extends ERequestMessage
implements Serializable
{
//---------------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Constants.
//
/**
* Serialization version identifier.
*/
private static final long serialVersionUID = 0x050200L;
//---------------------------------------------------------------
// Member methods.
//
//-----------------------------------------------------------
// Constructors.
//
/**
* Creates a new monitor object request generated from the
* builder settings.
* @param builder takes setting from this message builder.
*/
private MonitoredObjectRequest(final Builder builder)
{
super (builder);
} // end of MonitoredObjectRequest(Builder)
//
// end of Constructors.
//-----------------------------------------------------------
public static Builder builder()
{
return (new Builder());
} // end of builder()
//---------------------------------------------------------------
// Inner classes.
//
public static final class Builder
extends ERequestMessage.Builder
{
//-----------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Member methods.
//
//-------------------------------------------------------
// Constructors.
//
private Builder()
{
super (MonitoredObjectRequest.class);
this.subject(Monitor.MONITOR_REQUEST);
} // end of Builder()
//
// end of Constructors.
//-------------------------------------------------------
//-------------------------------------------------------
// Builder Method Overrides.
//
@Override
protected MonitoredObjectRequest buildImpl()
{
return (new MonitoredObjectRequest(this));
} // end of buildImpl()
//
// end of Builder Method Overrides.
//-------------------------------------------------------
} // end of class Builder
} // end of class MonitoredObjectRequest