Package flex.messaging.services

Examples of flex.messaging.services.ServiceAdapter


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


       
        ConfigMap cm = destination.describeDestination().getPropertyAsMap("channels", null);       
        if (cm != null)
            Log.getLogger("QE.CODE_COVERAGE").debug("Destination " + dest_runtime + " has " + cm.size() + " channels." );
       
        ServiceAdapter adapter = destination.getAdapter();
        if (adapter != null)
        {
            destination.setAdapter(null);
            destination.setAdapter(adapter);
            destination.start();   
View Full Code Here

            se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopicString, destination.getId()});
            throw se;
        }
        Subtopic subtopic = getSubtopic(subtopicString);
        // Give a MessagingAdapter a chance to block the send to this subtopic.
        ServiceAdapter adapter = destination.getAdapter();
        if (adapter instanceof MessagingSecurity)
        {
            if (!((MessagingSecurity)adapter).allowSend(subtopic))
            {
                ServiceException se = new ServiceException();
View Full Code Here

                // It's a resubscribe. Reset the endpoint push state for the subscription to make sure its current
                // because a resubscribe could be arriving over a new endpoint or a new session.
                client.resetEndpoint(endpointId);
            }

            ServiceAdapter adapter = destination.getAdapter();
            client.updateLastUse();

            if (subtopic == null)
            {
                topicSub = globalSubscribers;
View Full Code Here

    private void createAdapter(Destination destination, DestinationSettings destSettings, ServiceSettings svcSettings)
    {
        AdapterSettings adapterSettings = destSettings.getAdapterSettings();
        String adapterId = adapterSettings.getId();

        ServiceAdapter adapter = destination.createAdapter(adapterId);

        // Initialize with service, adapter and then destination properties
        adapter.initialize(adapterId, svcSettings.getProperties());
        adapter.initialize(adapterId, adapterSettings.getProperties());
        adapter.initialize(adapterId, destSettings.getProperties());

    }
View Full Code Here

    {
        ServiceControl parent = (ServiceControl)getParentControl();
        parent.removeDestination(getObjectName());
       
        // Unregister adapter of the destination
        ServiceAdapter child = destination.getAdapter();
        if (child.getControl() != null)
        {
            child.getControl().unregister();
            child.setControl(null);
            child.setManaged(false);
        }
       
        super.preDeregister();
    }
View Full Code Here

        String adapterClassName = (String)adapterClasses.get(id);
        Class adapterClass = ClassUtil.createClass(adapterClassName,
                FlexContext.getMessageBroker() == null ?
                      null : FlexContext.getMessageBroker().getClassLoader());

        ServiceAdapter adapter = (ServiceAdapter)ClassUtil.createDefaultInstance(adapterClass, ServiceAdapter.class);
        adapter.setId(id);
        adapter.setManaged(isManaged());
        adapter.setDestination(this);

        return adapter;
    }
View Full Code Here

     * Used by setAdapter and addAdapter. It removes the current adapter
     * of the destination
     */
    private void removeAdapter()
    {
        ServiceAdapter adapter = getAdapter();
        if (adapter != null)
        {
            adapter.stop();
        }
        this.adapter = null;
    }
View Full Code Here

    {
        ServiceControl parent = (ServiceControl)getParentControl();
        parent.removeDestination(getObjectName());
       
        // Unregister adapter of the destination
        ServiceAdapter child = destination.getAdapter();
        if (child.getControl() != null)
        {
            child.getControl().unregister();
            child.setControl(null);
            child.setManaged(false);
        }
       
        super.preDeregister();
    }
View Full Code Here

            se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopicString, destination.getId()});
            throw se;
        }
        Subtopic subtopic = getSubtopic(subtopicString);
        // Give a MessagingAdapter a chance to block the send to this subtopic.
        ServiceAdapter adapter = destination.getAdapter();
        if (adapter instanceof MessagingSecurity)
        {
            if (!((MessagingSecurity)adapter).allowSend(subtopic))
            {
                ServiceException se = new ServiceException();
View Full Code Here

TOP

Related Classes of flex.messaging.services.ServiceAdapter

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.