Package flex.messaging.services

Examples of flex.messaging.services.Service


     *   @param serviceName The target service name
     *   @return An objectName for the service MBean.
     */
    public String getObjectNameForService(String serviceName) throws Exception
    {        
        Service service = (Service) mb.getService(serviceName);
        if (service == null)
            throw new Exception("Service " + serviceName + " not found");
        BaseControl bc = service.getControl();
        return bc.getObjectName().toString();
    }    
View Full Code Here


        return bc.getObjectName().toString();
    }
   
    private Destination getDestination(String serviceName, String destinationName) throws Exception
    {
        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 id Id of the <code>AbstractBootstrapService</code>.
     * @param properties Properties for the <code>AbstractBootstrapService</code>.
     */
    public void initialize(String id, ConfigMap properties)
    {
        Service messagingService = createService();
        createDestination1(messagingService);
        createDestination2(messagingService);
    }
View Full Code Here

     */
    private Service createService()
    {
        String serviceId = "messaging-service";
        String serviceClass = "flex.messaging.services.MessageService";
        Service messageService = broker.createService(serviceId, serviceClass);

        messageService.registerAdapter("actionscript", "flex.messaging.services.messaging.adapters.ActionScriptAdapter");
        messageService.registerAdapter("jms", "flex.messaging.services.messaging.adapters.JMSAdapter");
        messageService.setDefaultAdapter("actionscript");

        return messageService;
    }
View Full Code Here

    public Map getServiceNames()
    {
        List serviceNames = new ArrayList();
        for (Iterator iter = msgBroker.getServices().values().iterator(); iter.hasNext();)
        {
            Service service = (Service) iter.next();
            serviceNames.add(service.getId());           
        }
        Map services = new HashMap();
        services.put("type", "serviceNames");
        services.put("value", serviceNames);
        return services;
View Full Code Here

        return "Service: " + id + " removed from MessageBroker";
    }
   
    public String removeDestination(String destId, String svcId)
    {
        Service svc = msgBroker.getService(svcId);
        svc.removeDestination(destId);
       
        return "Destination: "+ destId + " removed from Service: "+svcId;
    }
View Full Code Here

     * @param id Id of the <code>AbstractBootstrapService</code>.
     * @param properties Properties for the <code>AbstractBootstrapService</code>.
     */
    public void initialize(String id, ConfigMap properties)
    {
        Service remotingService = createService();
        createDestination1(remotingService);
        createDestination2(remotingService);
        createDestination3(remotingService);
    }
View Full Code Here

    */
    private Service createService()
    {
        String serviceId = "remoting-service";
        String serviceClass = "flex.messaging.services.RemotingService";
        Service remotingService = broker.createService(serviceId, serviceClass);

        String adapterId = "java-object";
        String adapterClass = "flex.messaging.services.remoting.adapters.JavaAdapter";
        remotingService.registerAdapter(adapterId, adapterClass);
        remotingService.setDefaultAdapter(adapterId);

        remotingService.addDefaultChannel("my-amf");
        remotingService.addDefaultChannel("my-http");

        return remotingService;
    }
View Full Code Here

     * @param id Id of the <code>AbstractBootstrapService</code>.
     * @param properties Properties for the <code>AbstractBootstrapService</code>.
     */
    public void initialize(String id, ConfigMap properties)
    {
        Service httpProxyService = createService();
        createDestination1(httpProxyService);
        createDestination2(httpProxyService);
        createDestination3(httpProxyService);
    }
View Full Code Here

     */
    private Service createService()
    {
        String serviceId = "proxy-service";
        String serviceClass = "flex.messaging.services.HTTPProxyService";       
        Service httpProxyService = broker.createService(serviceId, serviceClass);

        // Note that <properties> are not set on the service since they are
        // adapter related properties and will be configured at adapter level

        httpProxyService.registerAdapter("http-proxy", "flex.messaging.services.http.HTTPProxyAdapter");
        httpProxyService.registerAdapter("soap-proxy", "flex.messaging.services.http.SOAPProxyAdapter");
        httpProxyService.setDefaultAdapter("http-proxy");

        httpProxyService.addDefaultChannel("my-http");
        httpProxyService.addDefaultChannel("my-amf");

        return httpProxyService;
    }
View Full Code Here

TOP

Related Classes of flex.messaging.services.Service

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.