muleapplicationevent.java

来自「提供ESB 应用mule源代码 提供ESB 应用mule源代码」· Java 代码 · 共 88 行

JAVA
88
字号
/* * $Id: MuleApplicationEvent.java 10662 2008-02-01 13:10:14Z romikk $ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */package org.mule.module.spring.events;import org.mule.api.MuleEventContext;import org.mule.api.endpoint.MalformedEndpointException;import java.util.Collections;import java.util.HashMap;import java.util.Map;import org.springframework.context.ApplicationContext;import org.springframework.context.ApplicationEvent;/** * <code>MuleApplicationEvent</code> is an Spring ApplicationEvent used to wrap a * DefaultMuleEvent */public class MuleApplicationEvent extends ApplicationEvent{    /**     * Serial version     */    private static final long serialVersionUID = 5297176859050194632L;    private final MuleEventContext context;    private final String endpoint;    private final ApplicationContext applicationContext;    private final Map properties = Collections.synchronizedMap(new HashMap());    public MuleApplicationEvent(Object message, String endpoint)    {        super(message);        this.endpoint = endpoint;        this.applicationContext = null;        this.context = null;    }    MuleApplicationEvent(Object message, MuleEventContext context, ApplicationContext appContext)        throws MalformedEndpointException    {        super(message);        this.context = context;        this.endpoint = context.getEndpointURI().toString();        this.applicationContext = appContext;    }    public MuleEventContext getMuleEventContext()    {        return context;    }    public String getEndpoint()    {        return endpoint;    }    public ApplicationContext getApplicationContext()    {        return applicationContext;    }    public Map getProperties()    {        return properties;    }    public void setProperty(Object key, Object value)    {        this.properties.put(key, value);    }    public Object getProperty(Object key)    {        return properties.get(key);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?