Package flex.messaging

Examples of flex.messaging.Destination


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


    {
        Service service = (Service) mb.getService(serviceName);
        if (service == null)
            throw new Exception("Service " + serviceName + " not found");
       
        Destination dest = service.getDestination(destinationName);
        if (dest == null)
            throw new Exception("Destination " + destinationName + " not found");

        return dest;
    }
View Full Code Here

     *   @param destinationName  The target destination name.
     *   @return An objectName for the destination MBean.
     */
    public String getObjectNameForDestination(String serviceName, String destinationName) throws Exception
    {         
        Destination dest = getDestination(serviceName, destinationName);
        BaseControl bc = dest.getControl();
        return bc.getObjectName().toString();
    }
View Full Code Here

     *   @param destinationName  The target adapterName name.
     *   @return An objectName for the destination MBean.
     */
    public String getObjectNameForAdapter(String serviceName, String destinationName, String adapterName) throws Exception
    {
        Destination dest = getDestination(serviceName, destinationName);
        ServiceAdapter adp = dest.getAdapter();
       
        if (adp == null)
            throw new Exception("Adapter " + adapterName + " not found");
       
        BaseControl bc = adp.getControl();
View Full Code Here

     *   @param destinationName  The target destination name.
     *   @return An objectName for the SubscriptionManager MBean.
     */
    public String getObjectNameForSubscriptionManager(String serviceName, String destinationName) throws Exception
    {        
        Destination dest = getDestination(serviceName, destinationName);
        if (!(dest instanceof MessageDestination))
            throw new Exception(destinationName + " not a MessageDestination");
        MessageDestination mdest = (MessageDestination)dest;

        BaseControl bc = mdest.getSubscriptionManager().getControl();    
View Full Code Here

     *   @param destinationName  The target destination name.
     *   @return An objectName for the ThrottleManager MBean.
     */
    public String getObjectNameForThrottleManager(String serviceName, String destinationName) throws Exception
    {        
        Destination dest = getDestination(serviceName, destinationName);
        if (!(dest instanceof MessageDestination))
            throw new Exception(destinationName + " not a MessageDestination");

        MessageDestination mdest = (MessageDestination)dest;
        BaseControl bc = mdest.getThrottleManager().getControl();     
View Full Code Here

    }
   
    // code coverage
    public void runCodeCoverage()
    {       
        Destination d = new Destination();
       
        MessageBroker mb = MessageBroker.getMessageBroker(null);
        MessageService service = (MessageService) mb.getService("message-service");
        MessageDestination destination = (MessageDestination)service.getDestination(dest_runtime);
       
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

        {
            return;
        }

        // Check if the Destination is started
        Destination destination = getDestination();
        if (!destination.isStarted())
        {
            if (Log.isWarn())
            {
                Log.getLogger(getLogCategory()).warn("Adapter with id '{0}' cannot be started" +
                        " when its Destination with id '{1}' is not started.",
                        new Object[]{getId(), destination.getId()});
            }
            return;
        }

        // Set up management
        if (isManaged() && destination.isManaged())
        {
            setupAdapterControl(destination);
            DestinationControl controller = (DestinationControl)destination.getControl();
            if (getControl() != null)
                controller.setAdapter(getControl().getObjectName());

        }
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.