INT-3099 Add IMAP Idle Application Events
Allow an application to be informed of problems on the IMAP idle thread by emitting an event containing the exception. Introduce IntegrationApplicationEvent hierarchy for all events emitted by SI components. INT-3099 Polishing (PR Comments) Separate TCP events into discrete subclasses.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.integration.file.event;
|
||||
|
||||
import org.springframework.integration.event.IntegrationEvent;
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @since 3.0
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class FileIntegrationEvent extends IntegrationEvent {
|
||||
|
||||
public FileIntegrationEvent(Object source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
private FileIntegrationEvent(Object source, Throwable cause) {
|
||||
super(source, cause);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* ApplicationEvents generated by the file module.
|
||||
*/
|
||||
package org.springframework.integration.file.event;
|
||||
@@ -17,7 +17,6 @@ package org.springframework.integration.file.tail;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisherAware;
|
||||
import org.springframework.core.task.SimpleAsyncTaskExecutor;
|
||||
@@ -25,6 +24,7 @@ import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.integration.Message;
|
||||
import org.springframework.integration.endpoint.MessageProducerSupport;
|
||||
import org.springframework.integration.file.FileHeaders;
|
||||
import org.springframework.integration.file.event.FileIntegrationEvent;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -116,7 +116,7 @@ public abstract class FileTailingMessageProducerSupport extends MessageProducerS
|
||||
}
|
||||
}
|
||||
|
||||
public static class FileTailingEvent extends ApplicationEvent {
|
||||
public static class FileTailingEvent extends FileIntegrationEvent {
|
||||
|
||||
private static final long serialVersionUID = -3382255736225946206L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user