Package flex.messaging.services

Examples of flex.messaging.services.MessageService


{   
   
    public void initialize(String id, ConfigMap properties)
    {
        //Create destination and add to the Service
        MessageService service = (MessageService) broker.getService("message-service");
        String dest = "MessageDest_startup";
        createDestination(dest, service);
       
        //Create destination that will be removed/re-added by the ROMessageDestination test.
        service = (MessageService) broker.getService("message-service");
View Full Code Here


   
   
    public void start()
    {
        //Create destination and add to the Service
        MessageService service = (MessageService) broker.getService("message-service");
        String id = "MessageDest_runtime";
        MessageDestination dest = createDestination(id, service);
        dest.start();
    }
View Full Code Here

    public String createMessageDestination()
    {
        String serviceId = "message-service";
        String id = "messaging_AMF_Poll_Runtime";

        MessageService msgService = (MessageService)msgBroker.getService(serviceId);
        MessageDestination msgDestination = (MessageDestination)msgService.createDestination(id);
        msgDestination.addChannel("my-amf-poll");

        if (msgService.isStarted())
            msgDestination.start();

        return "Destination: " + id + " created for Service: " + serviceId;
    }
View Full Code Here

    public String removeMessageDestination()
    {
        String serviceId = "message-service";
        String id = "messaging_AMF_Poll_Runtime";

        MessageService msgService = (MessageService)msgBroker.getService(serviceId);
        msgService.removeDestination(id);

        return "Destination: " + id + " removed from Service: " + serviceId;
    }
View Full Code Here

    public String createMessageDestinationWithJMSAdapter()
    {
        String serviceId = "message-service";
        String id = "messaging_AMF_Poll_JMS_Topic_Runtime";

        MessageService msgService = (MessageService)msgBroker.getService(serviceId);
        MessageDestination msgDestination = (MessageDestination)msgService.createDestination(id);
        msgDestination.addChannel("my-amf-poll");

        // Use JMSSettings object for the <jms> properties above
        JMSSettings js = new JMSSettings();
        js.setConnectionFactory("java:comp/env/jms/flex/TopicConnectionFactory");
        js.setDestinationType("Topic");       
        js.setMessageType("javax.jms.TextMessage");       
        js.setDestinationJNDIName("java:comp/env/jms/topic/flex/simpletopic");

        JMSAdapter adapter = new JMSAdapter();
        adapter.setId("jms");
        adapter.setJMSSettings(js);
        adapter.setDestination(msgDestination);

        if (msgService.isStarted())
            msgDestination.start();

        return "Destination: " + id + " created for Service: " + serviceId;
    }
View Full Code Here

   
    public void initialize(String id, ConfigMap properties)
    {
        if (broker != null)
        {
            MessageService service = (MessageService) broker.getService("message-service");       
            createDestination(dest_startup, service);
        }
    }
View Full Code Here

   
    public void start()
    {       
        if(broker != null)
        {
            MessageService service = (MessageService) broker.getService("message-service");
           
            MessageDestination destination = createDestination(dest_runtime, service);
                      
            // code coverage
            destination.addChannel("qa-polling-amf");       
View Full Code Here

    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);
       
        Log.getLogger("QE.CODE_COVERAGE").debug("Destination " + dest_runtime + " isCluster=" + destination.isClustered() +" isBackendShared=" + destination.isBackendShared());
       
        destination.removeChannel("qa-polling-amf");
        destination.addChannel("non-existing-channel");
View Full Code Here

    }
   
    // Create a new Message destination dynamically
    String serviceId = "message-service";
    MessageBroker broker = MessageBroker.getMessageBroker(null);
    MessageService service = (MessageService) broker.getService(serviceId);
    MessageDestination destination = (MessageDestination) service.createDestination(id);

    if (service.isStarted())
    {
      destination.start();
    }

    rooms.add(id);
View Full Code Here

    /**
     * Handle a data message intended for this adapter.
     */
    public Object invoke(Message message)
    {
        MessageService msgService = (MessageService)getDestination().getService();
        msgService.pushMessageToClients(message, true);
        msgService.sendPushMessageFromPeer(message, true);
        return null;
    }
View Full Code Here

TOP

Related Classes of flex.messaging.services.MessageService

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.