Spring Framework ApplicationEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ApplicationEvent class.

This code example shows how to use the following methods:
	 * @param source the component that is acting as the broker, or as a relay 
	 * for an external broker, that has changed availability. Must not be {@code 
	 * null}. 
	 */ 
	public BrokerAvailabilityEvent(boolean brokerAvailable, Object source) {
		super(source);
		this.brokerAvailable = brokerAvailable;
	} 
 
	public boolean isBrokerAvailable() { 
		return this.brokerAvailable;
	} 
 
	@Override 
	public String toString() {
		return "BrokerAvailabilityEvent[available=" + this.brokerAvailable + ", " + getSource() + "]";
	} 
 
} 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	 * 
	 * @param source the component that published the event (never {@code null}) 
	 * @param message the connect message 
	 */ 
	protected AbstractSubProtocolEvent(Object source, Message<byte[]> message) {
		super(source);
		Assert.notNull(message, "'message' must not be null");
		this.message = message;
	} 
 
	/** 
	 * Return the Message associated with the event. Here is an example of 
	 * obtaining information about the session id or any headers in the 
	 * message: 
	 * 
	 * <pre class="code"> 
	 * StompHeaderAccessor headers = StompHeaderAccessor.wrap(message); 
	 * headers.getSessionId(); 
	 * headers.getSessionAttributes(); 
	 * headers.getPrincipal(); 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	 * @param userName the name of the user that was associated with the 
	 * request, if any (usually the UserPrincipal) 
	 * @param processingTimeMillis the processing time of the request in milliseconds 
	 */ 
	public RequestHandledEvent(Object source, String sessionId, String userName, long processingTimeMillis) {
		super(source);
		this.sessionId = sessionId;
		this.userName = userName;
		this.processingTimeMillis = processingTimeMillis;
	} 
 
	/** 
	 * Create a new RequestHandledEvent with session information. 
	 * @param source the component that published the event 
	 * @param sessionId the id of the HTTP session, if any 
	 * @param userName the name of the user that was associated with the 
	 * request, if any (usually the UserPrincipal) 
	 * @param processingTimeMillis the processing time of the request in milliseconds 
	 * @param failureCause the cause of failure, if any 
	 */ 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getSource
 
	/** 
	 * Get the {@code ApplicationContext} that the event was raised for. 
	 */ 
	public final ApplicationContext getApplicationContext() {
		return (ApplicationContext) getSource();
	} 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * @since 3.0 
 */ 
public abstract class SessionCreationEvent extends ApplicationEvent { 
 
    public SessionCreationEvent(Object source) { 
        super(source); 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * @since 3.0 
 */ 
public abstract class SessionDestroyedEvent extends ApplicationEvent { 
 
    public SessionDestroyedEvent(Object source) { 
        super(source); 
    } 
 
    /** 
     * Provides the {@code SecurityContext} instances which were associated with the destroyed session. Usually there 
     * will be only one security context per session. 
     * 
     * @return the {@code SecurityContext} instances which were stored in the current session (an empty list if there 
     * are none). 
     */ 
    public abstract List<SecurityContext> getSecurityContexts(); 
 
    /** 
     * @return the identifier associated with the destroyed session. 
     */ 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * Construct the event, passing in the secure object being intercepted. 
     * 
     * @param secureObject the secure object 
     */ 
    public AbstractAuthorizationEvent(Object secureObject) { 
        super(secureObject); 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
public class Neo4jLifecycleEvent<T> extends ApplicationEvent { 
    private final T entity; 
 
    public Neo4jLifecycleEvent(Object source,T entity) { 
        super(source); 
        this.entity = entity; 
    } 
 
    public T getEntity() { 
        return entity; 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
public class SimpleMessageApplicationEvent extends ApplicationEvent { 
 
	private String message; 
 
	public SimpleMessageApplicationEvent(Object source, String message) { 
		super(source); 
		this.message = message; 
	} 
	 
	/* (non-Javadoc) 
	 * @see java.util.EventObject#toString() 
	 */ 
    @Override 
	public String toString() { 
		return "message=["+message+"], " + super.toString(); 
	} 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
public class SimpleMessageApplicationEvent extends ApplicationEvent { 
 
	private String message; 
 
	public SimpleMessageApplicationEvent(Object source, String message) { 
		super(source); 
		this.message = message; 
	} 
	 
	/* (non-Javadoc) 
	 * @see java.util.EventObject#toString() 
	 */ 
	@Override 
	public String toString() { 
		return "message=["+message+"], " + super.toString(); 
	} 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework ApplicationEvent Methods: