Package flex.messaging

Examples of flex.messaging.Destination


     *
     * @param destination The <code>Destination</code> of the <code>ServiceAdapter</code>.
     */
    public void setDestination(Destination destination)
    {
        Destination oldDestination = getDestination();

        setParent(destination);

        if (oldDestination != null)
            oldDestination.setAdapter(null);

        // Set destination's adapter if needed
        if (destination.getAdapter() != this)
        {
            destination.setAdapter(this);
View Full Code Here


        MessageBrokerControl parent = (MessageBrokerControl)getParentControl();
        parent.removeService(getObjectName());
       
        // Unregister destinations of the service
        for (Iterator iter = service.getDestinations().values().iterator(); iter.hasNext();) {
            Destination child = (Destination) iter.next();
            if (child.getControl() != null)
            {
                child.getControl().unregister();
                child.setControl(null);
                child.setManaged(false);
            }
           
        }
       
        super.preDeregister();
View Full Code Here

     * @throws <code>MessageException</code> if no such <code>Destination</code> exists.
     */
    public Destination getDestination(Message message)
    {
        String id = message.getDestination();
        Destination result = getDestination(id);
        if (result == null)
        {
            throw new MessageException
                    ("No destination '" + id + "' exists in service " + getClass().getName());
        }
View Full Code Here

     *
     * @param id The id of the <code>Destination</code>.
     */
    public Destination getDestination(String id)
    {
        Destination result = (Destination)destinations.get(id);
        return result;
    }
View Full Code Here

     * @param id The id of the <code>Destination</code>.
     * @return The <code>Destination</code> instanced created.
     */
    public Destination createDestination(String id)
    {
        Destination destination = new Destination();
        destination.setId(id);
        destination.setManaged(isManaged());
        destination.setService(this);

        return destination;
    }
View Full Code Here

     * @param id The id of the <code>Destination</code>.
     * @return Previous <code>Destination</code> associated with the id.
     */
    public Destination removeDestination(String id)
    {
        Destination destination = (Destination)destinations.get(id);
        if (destination != null)
        {
            destination.stop();
            destinations.remove(id);
            getMessageBroker().unregisterDestination(id);
        }
        return destination;
    }
View Full Code Here

     */
    private void startDestinations()
    {
        for (Iterator iter = destinations.values().iterator(); iter.hasNext(); )
        {
            Destination destination = (Destination)iter.next();

            long timeBeforeStartup = 0;
            if (Log.isDebug())
                timeBeforeStartup = System.currentTimeMillis();

            destination.start();

            if (Log.isDebug())
            {
                long timeAfterStartup = System.currentTimeMillis();
                Long diffMillis = new Long(timeAfterStartup - timeBeforeStartup);
                Log.getLogger(LOG_CATEGORY_STARTUP_DESTINATION).debug("Destination with id '{0}' is ready (startup time: '{1}' ms)",
                        new Object[]{destination.getId(), diffMillis});
            }
        }
    }
View Full Code Here

     */
    private void stopDestinations()
    {
        for (Iterator iter = destinations.values().iterator(); iter.hasNext();)
        {
            Destination destination = (Destination)iter.next();
            destination.stop();
        }
    }
View Full Code Here

     *
     * @exclude
     */
    public void receiveSubscriptions(String destinationId, Object subscriptions, Object senderAddress)
    {
        Destination destination = getDestination(destinationId);
        if (destination instanceof MessageDestination)
        {
            ((MessageDestination) destination).getRemoteSubscriptionManager().setSubscriptionState(subscriptions, senderAddress);
        }
        else if (subscriptions != null)
View Full Code Here

     *
     * We add or remove a remote subscription...
     */
    public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress)
    {
        Destination destination = getDestination(destinationId);

        RemoteSubscriptionManager subMgr = ((MessageDestination) destination).getRemoteSubscriptionManager();

        if (destination instanceof MessageDestination)
        {
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.