paremeterized with H for 'handler'

This commit is contained in:
Mark Fisher
2011-10-19 11:34:56 -04:00
parent 5a9a21bcee
commit 0f922f83c6

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2011 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
@@ -29,9 +29,9 @@ import org.springframework.util.Assert;
* @author Dave Syer
* @author Oleg Zhurakousky
*/
public abstract class AbstractSimpleMessageHandlerFactoryBean<M extends MessageHandler> implements FactoryBean<MessageHandler>, BeanFactoryAware {
public abstract class AbstractSimpleMessageHandlerFactoryBean<H extends MessageHandler> implements FactoryBean<MessageHandler>, BeanFactoryAware {
private volatile M handler;
private volatile H handler;
private volatile MessageChannel outputChannel;
@@ -64,7 +64,7 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean<M extends MessageH
return this.beanFactory;
}
public M getObject() throws Exception {
public H getObject() throws Exception {
if (this.handler == null) {
this.handler = this.createHandlerInternal();
Assert.notNull(this.handler, "failed to create MessageHandler");
@@ -81,7 +81,7 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean<M extends MessageH
return this.handler;
}
protected final M createHandlerInternal() {
protected final H createHandlerInternal() {
synchronized (this.initializationMonitor) {
if (this.initialized) {
// There was a problem when this method was called already
@@ -104,7 +104,7 @@ public abstract class AbstractSimpleMessageHandlerFactoryBean<M extends MessageH
return handler;
}
protected abstract M createHandler();
protected abstract H createHandler();
public Class<? extends MessageHandler> getObjectType() {
if (this.handler != null) {