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

flex.messaging.config.DestinationSettings Maven / Gradle / Ivy

Go to download

BlazeDS is the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Adobe Flex and Adobe AIR applications for more responsive rich Internet application (RIA) experiences.

There is a newer version: 3.2.0.3978
Show newest version
/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  [2002] - [2007] Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */
package flex.messaging.config;

import java.util.ArrayList;
import java.util.List;

/**
 * Destinations are configured for a particular Service. A
 * destination's configuration includes an id attribute to provide
 * a public name for clients to use when sending messages.
 * 

* The configuration also specifies which channels are valid to contact the * destination, as well as which adapter a service must use to process * client messages for this destination and any security constraints that need * to be enforced. *

* * @see flex.messaging.Destination * @author Peter Farland */ public class DestinationSettings extends PropertiesSettings { /** * @exclude */ public static final String SERVER_ELEMENT = "server"; private final String id; private String sourceFile; private List channelSettings; private AdapterSettings adapterSettings; private SecurityConstraint constraint; /** * Used to construct a new set of properties to describe a destination. * Note that an identity is required in order for clients to refer to a * destination. * * @param id A string representing the unique identity of this destination. */ public DestinationSettings(String id) { this.id = id; channelSettings = new ArrayList(); } /** * Gets the unique identity used by clients to target a destination. * * @return String the destination's id. */ public String getId() { return id; } /** * Internal use only. * @exclude */ String getSourceFile() { return sourceFile; } /** * Internal use only. * @exclude */ void setSourceFile(String sourceFile) { this.sourceFile = sourceFile; } /* * CHANNEL SETTINGS */ /** * Adds a channel to the set of channels that should be used to contact * this destination. The order in which channels are added is significant * (clients use this order to locate an available channel and failover to * the next in the list on failure). * * @param c the ChannelSettings to add to the set of * channel definitions for this destination. */ public void addChannelSettings(ChannelSettings c) { if (c != null) { channelSettings.add(c); } } /** * Overrides the set of channels that can be used to contact this * destination. * * @param settings A List of ChannelSettings. */ public void setChannelSettings(List settings) { channelSettings = settings; } /** * Gets the set of channels that can be used to contact this destination. * * @return a java.util.List of ChannelSettings * describing the channels that can be used to contact this destination. */ public List getChannelSettings() { return channelSettings; } /* * SECURITY */ /** * Gets the SecurityConstraint that will be applied to this * destination, or null if no constraint has been registered. * * @return the SecurityConstraint for this destination. */ public SecurityConstraint getConstraint() { return constraint; } /** * Sets the security constraint to be applied to this destination. Security * constraints restrict which clients can contact this destination. Use * null to remove an existing constraint. * * @param sc the SecurityConstraint to apply to this * destination. */ public void setConstraint(SecurityConstraint sc) { constraint = sc; } /* * SERVICE ADAPTER */ /** * Sets the service adapter to be used when the managing service is * processing messages bound for this destination. * * @param a The AdapterSettings that describe the adapter * to use for this destination. */ public void setAdapterSettings(AdapterSettings a) { adapterSettings = a; } /** * Gets the adapter to be used for this destination. * * @return AdapterSettings for this destinations adapter. * A null value implies the the default service adapter should * be used. */ public AdapterSettings getAdapterSettings() { return adapterSettings; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy