net.sf.eBusx.monitor.ApplicationInfoRequest Maven / Gradle / Ivy
//
// Copyright 2024 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.EField;
import net.sf.eBus.messages.EReplyInfo;
import net.sf.eBus.messages.ERequestMessage;
/**
* Requests application information opened with
* {@link Monitor#openMonitor(String, String, String, String, String, EField)}.
* Request message subject is
* {@link Monitor#APP_INFO_REQUEST_SUBJECT}.
* If application information is updated, then updates are
* published via {@link ApplicationInfo} on subject
* {@code /eBus/monitor/update//} where <host>
* is {@link Monitor#hostName()} and <app> is
* {@link Monitor#applicationName()}.
*
* @see ApplicationInfoReply
* @see ApplicationInfo
* @see Monitor
*
* @author Charles W. Rapp
*/
@EReplyInfo (replyMessageClasses = {ApplicationInfoReply.class})
public final class ApplicationInfoRequest
extends ERequestMessage
implements Serializable
{
//---------------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Constants.
//
/**
* Serialization version identifier.
*/
private static final long serialVersionUID = 0x070400L;
//---------------------------------------------------------------
// Member methods.
//
//-----------------------------------------------------------
// Constructors.
//
/**
* Creates a new application information request generated
* from builder settings.
* @param builder take settings from this message builder.
*/
public ApplicationInfoRequest(final Builder builder)
{
super (builder);
} // end of ApplicationInfoRequest(Builder)
//
// end of Constructors.
//-----------------------------------------------------------
/**
* Returns a new instance of application info request
* builder.
* @return {@code ApplicationInfoRequest.Builder}.
*/
public static Builder builder()
{
return (new Builder());
} // end of builder()
//---------------------------------------------------------------
// Inner classes.
//
/**
* Builder class used to create an
* {@link ApplicationInfoRequest} message. A new
* {@code Builder} instance is obtained from
* {@link ApplicationInfoRequest#builder()}.
*/
public static final class Builder
extends ERequestMessage.Builder
{
//-----------------------------------------------------------
// Member data.
//
//-----------------------------------------------------------
// Member methods.
//
//-------------------------------------------------------
// Constructors.
//
private Builder()
{
super (ApplicationInfoRequest.class);
} // end of Builder()
//
// end of Constructors.
//-------------------------------------------------------
//-------------------------------------------------------
// Builder Method Overrides.
//
@Override
protected ApplicationInfoRequest buildImpl()
{
return (new ApplicationInfoRequest(this));
} // end of buildImpl()
//
// end of Builder Method Overrides.
//-------------------------------------------------------
} // end of class Builder
} // end of class ApplicationInfoRequest