Package flex.messaging

Examples of flex.messaging.MessageDestination


        </channels>
    </destination>
    */
    private MessageDestination createDestination(String id, MessageService messageService)
    {
        MessageDestination msgDest;
        msgDest = (MessageDestination)messageService.createDestination(id);

        // <network>
        NetworkSettings ns = new NetworkSettings();
        ns.setSubscriptionTimeoutMinutes(0);
        ThrottleSettings ts = new ThrottleSettings();
        ts.setInboundPolicy(ThrottleSettings.Policy.ERROR);
        ts.setIncomingClientFrequency(0);
        ts.setOutboundPolicy(ThrottleSettings.Policy.IGNORE);
        ts.setOutgoingClientFrequency(0);
        ns.setThrottleSettings(ts)
        ns.setClusterId("default-tcp-cluster");
        msgDest.setNetworkSettings(ns);
       
        // <server>
        ServerSettings ss = new ServerSettings();
        ss.setMessageTTL(0);
        ss.setDurable(false);
        msgDest.setServerSettings(ss);
       
        //Use a channel that does not use the {server.name}:{server.port} tokens
        //msgDest.addChannel("qa-rtmp-cluster");       
        msgDest.addChannel("qa-amf-polling-cluster");
        //msgDest.addChannel("qa-http-polling-cluster");
       
        return msgDest;
    }
View Full Code Here


        <adapter ref="jms"></adapter>
     */

    private MessageDestination createDestination(String id, MessageService messageService)
    {
        MessageDestination msgDest;
        msgDest = (MessageDestination)messageService.createDestination(id);

        // <network>
        NetworkSettings ns = new NetworkSettings();
        ns.setSubscriptionTimeoutMinutes(0);
        ThrottleSettings ts = new ThrottleSettings();
        ts.setIncomingClientFrequency(0);
        ts.setInboundPolicy(ThrottleSettings.Policy.ERROR);
        ts.setOutgoingClientFrequency(0);
        ts.setOutboundPolicy(ThrottleSettings.Policy.IGNORE);
        ns.setThrottleSettings(ts);  
        msgDest.setNetworkSettings(ns);
       
        // <server>
        ServerSettings ss = new ServerSettings();
        ss.setDurable(false);
        msgDest.setServerSettings(ss);
       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
View Full Code Here

    // Create another destination after server startup: notice that it must be explicitly started
    public void start()
    {
        MessageService service = (MessageService) getMessageBroker().getService("message-service");
        String id = "JMSDestNoConnFact_runtime";
        MessageDestination destination = createDestination(id, service);
        destination.start();
    }
View Full Code Here

     </destination>
     */

    private MessageDestination createDestination(String id, MessageService messageService)
    {
        MessageDestination msgDest;
        msgDest = (MessageDestination)messageService.createDestination(id);

        // <network>
        NetworkSettings ns = new NetworkSettings();
        ns.setSubscriptionTimeoutMinutes(0);
        ThrottleSettings ts = new ThrottleSettings();
        ts.setIncomingClientFrequency(0);
        ts.setInboundPolicy(ThrottleSettings.Policy.ERROR);
        ts.setOutgoingClientFrequency(0);
        ts.setOutboundPolicy(ThrottleSettings.Policy.IGNORE);
        ns.setThrottleSettings(ts);  
        msgDest.setNetworkSettings(ns);
       
        // <server>
        ServerSettings ss = new ServerSettings();
        ss.setDurable(false);
        msgDest.setServerSettings(ss);
       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
View Full Code Here

    // Create a destination after server startup.
    public void start()
    {
        MessageService service = (MessageService) getMessageBroker().getService("message-service");
        String id = "JMSDestNoJNDIDestName_runtime";
        MessageDestination destination = createDestination(id, service);
        destination.start();
    }
View Full Code Here

        createDestination(dest, channel, service);
    }

    private MessageDestination createDestination(String id, String channel, MessageService messageService)
    {
        MessageDestination msgDest;
        msgDest = (MessageDestination)messageService.createDestination(id);

        // <network>
        NetworkSettings ns = new NetworkSettings();
        ns.setSubscriptionTimeoutMinutes(0);
        msgDest.setNetworkSettings(ns);
       
        // <server>
        ServerSettings ss = new ServerSettings();
        ss.setMessageTTL(0);
        ss.setDurable(false);
        msgDest.setServerSettings(ss);
       
        msgDest.addChannel(channel);
       
        return msgDest;
    }
View Full Code Here

    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();    
        return bc.getObjectName().toString();
    }
View Full Code Here

    {        
        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();     
        return bc.getObjectName().toString();
    }
View Full Code Here

   
         </destination>
     */
    private MessageDestination createDestination(String id, MessageService messageService)
    {
        MessageDestination msgDest;
        msgDest = (MessageDestination)messageService.createDestination(id);

        // <network>
        NetworkSettings ns = new NetworkSettings();
        ns.setSubscriptionTimeoutMinutes(0);
       
        // add clusterId and sharedBackend for code coverage
        ns.setClusterId("default-tcp-cluster");
        ns.setSharedBackend(true);
       
        ThrottleSettings ts = new ThrottleSettings();
        ts.setIncomingClientFrequency(0);
        ts.setInboundPolicy(ThrottleSettings.Policy.ERROR);
        ts.setOutgoingClientFrequency(0);
        ts.setOutboundPolicy(ThrottleSettings.Policy.IGNORE);
 
        ns.setThrottleSettings(ts);  
        msgDest.setNetworkSettings(ns);
       
        // <server>
        ServerSettings ss = new ServerSettings();
        ss.setDurable(false);
        msgDest.setServerSettings(ss);
       
        // <channels>
        msgDest.addChannel("qa-polling-amf");
       
        //Properties that appear in the destination above must "really" be set in a JMS adapter
        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        // Use JMSSettings object for the <jms> properties above
View Full Code Here

    {       
        if(broker != null)
        {
            MessageService service = (MessageService) broker.getService("message-service");
           
            MessageDestination destination = createDestination(dest_runtime, service);
                      
            // code coverage
            destination.addChannel("qa-polling-amf");       
            assert (destination.getExtraProperty("extra-name")== null);       
            destination.addExtraProperty("extra-name", dest_runtime);       
            Log.getLogger("QE.CODE_COVERAGE").debug("Destionation " + destination.getExtraProperty("extra-name") + " isCluster=" + destination.isClustered() " isBackendShared=" + destination.isBackendShared());
           
            destination.start();
           
            // add a runtime remote destination to run code coverage
            RemotingService rs = (RemotingService) broker.getService("remoting-service");
            String id = "RuntimeRemotingDest_JMS";
            RemotingDestination rsd = (RemotingDestination)rs.createDestination(id);
View Full Code Here

TOP

Related Classes of flex.messaging.MessageDestination

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.