All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.eBus.messages.ELocalOnly Maven / Gradle / Ivy

There is a newer version: 7.6.0
Show newest version
//
// Copyright 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.eBus.messages;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This class-level annotation is used to mark an
 * {@link EMessage} or {@link EField} class as local-only meaning
 * that the message may only be used within the JVM and will not
 * be transmitted to remote eBus applications. Marking a message
 * as {@code @ELocalOnly} prevents eBus from generating the
 * serialization/de-serialization code necessary for message
 * transmission. This means that a local-only message may
 * contain unsupported field types like {@link java.util.Map}.
 * 

* This annotation should be used when messages are designed for * internal use only and should not be transmitted outside the * JVM. {@code net.sf.eBusx.io}, {@code net.sf.eBusx.util}, and * {@code net.sf.eBus.feed} packages use this feature for their * JVM-only messages. *

*

* Note that a message is assumed to transmittable unless * annotated as {@code ELocalOnly}. *

*

* It is an error to open an eBus feed for a {@code ELocalOnly} * message but with {@link net.sf.eBus.client.EFeed.FeedScope} * other than {@code FeedScope.LOCAL_ONLY}. *

*

* It is an error to define an eBus message or field as * transmittable (not local-only) but contains a local-only * {@link EMessageObject} field. *

* * @author Charles W. Rapp */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented public @interface ELocalOnly {}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy