From ba9089b37f7b35d333bf3148c3a6d58b2dcc17ca Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 9 May 2011 11:57:47 -0700 Subject: [PATCH] SGF-50 + start working on the CacheServer support --- .../server/CacheServerFactoryBean.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java diff --git a/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java b/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java new file mode 100644 index 00000000..958585a1 --- /dev/null +++ b/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java @@ -0,0 +1,50 @@ +/* + * Copyright 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 + * + * 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.data.gemfire.server; + +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.factory.InitializingBean; + +import com.gemstone.gemfire.cache.server.CacheServer; + +/** + * @author Costin Leau + */ +public class CacheServerFactoryBean implements FactoryBean, + InitializingBean, DisposableBean { + + private CacheServer cacheServer; + + public CacheServer getObject(){ + return cacheServer; + } + + public Class getObjectType() { + return ((this.cacheServer != null) ? cacheServer.getClass() : CacheServer.class); + } + + public boolean isSingleton() { + return true; + } + + public void afterPropertiesSet() { + } + + public void destroy() { + } + +} \ No newline at end of file