Package flex.messaging

Examples of flex.messaging.Destination


     */
    private void startDestinations()
    {
        for (Iterator iter = destinations.values().iterator(); iter.hasNext(); )
        {
            Destination destination = (Destination)iter.next();
           
            long timeBeforeStartup = 0;
            if (Log.isDebug())
                timeBeforeStartup = System.currentTimeMillis();

            destination.start();
           
            if (Log.isDebug())
            {
                long timeAfterStartup = System.currentTimeMillis();           
                Long diffMillis = new Long(timeAfterStartup - timeBeforeStartup);
                Log.getLogger(LOG_CATEGORY_STARTUP_DESTINATION).debug("Destination with id '{0}' is ready (startup time: '{1}' ms)",
                        new Object[]{destination.getId(), diffMillis});                  
            }           
        }
    }
View Full Code Here


     */
    private void stopDestinations()
    {
        for (Iterator iter = destinations.values().iterator(); iter.hasNext();)
        {
            Destination destination = (Destination)iter.next();
            destination.stop();
        }
    }
View Full Code Here

     *
     * @exclude
     */
    public void receiveSubscriptions(String destinationId, Object subscriptions, Object senderAddress)
    {
      Destination destination = getDestination(destinationId);
        if (destination instanceof MessageDestination)
        {
            ((MessageDestination) destination).getRemoteSubscriptionManager().setSubscriptionState(subscriptions, senderAddress);
        }
        else if (subscriptions != null)
View Full Code Here

     *
     * We add or remove a remote subscription...
     */
    public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress)
    {
        Destination destination = getDestination(destinationId);

        RemoteSubscriptionManager subMgr = ((MessageDestination) destination).getRemoteSubscriptionManager();

        if (destination instanceof MessageDestination)
        {
View Full Code Here

    }

    private void createDestination(DestinationSettings destSettings, Service service, ServiceSettings svcSettings)
    {
        String destId = destSettings.getId();                  
        Destination destination = service.createDestination(destId);
       
        // Channels
        List chanSettings = destSettings.getChannelSettings();
        if (chanSettings.size() > 0)
        {
            List channelIds = new ArrayList(2);
            for (Iterator iter = chanSettings.iterator(); iter.hasNext();) {
                ChannelSettings cs = (ChannelSettings) iter.next();
                channelIds.add(cs.getId());
            }
            destination.setChannels(channelIds);
        }

        // Security
        SecurityConstraint constraint = destSettings.getConstraint();
        destination.setSecurityConstraint(constraint);

        // Initialize with service, adapter and destination properties
        destination.initialize(destId, svcSettings.getProperties());
        destination.initialize(destId, destSettings.getAdapterSettings().getProperties());
        destination.initialize(destId, destSettings.getProperties());
       
        // Service Adapter
        createAdapter(destination, destSettings, svcSettings);                                 
    }
View Full Code Here

     *
     * @param destination
     */
    public void setDestination(Destination destination)
    {
        Destination dest = (MessageDestination)destination;
        super.setDestination(dest);
    }
View Full Code Here

     *
     * @param destination remoting destination to associate with this adapter
     */
    public void setDestination(Destination destination)
    {
        Destination dest = (RemotingDestination)destination;
        super.setDestination(dest);
    }
View Full Code Here

     *
     * @param destination
     */
    public void setDestination(Destination destination)
    {
        Destination dest = (HTTPProxyDestination)destination;
        super.setDestination(dest);
    }
View Full Code Here

TOP

Related Classes of flex.messaging.Destination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.