com.consol.citrus.server.AbstractServer Maven / Gradle / Ivy
/*
* Copyright 2006-2010 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 com.consol.citrus.server;
import com.consol.citrus.channel.*;
import com.consol.citrus.context.TestContextFactory;
import com.consol.citrus.endpoint.*;
import com.consol.citrus.messaging.Consumer;
import com.consol.citrus.messaging.Producer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.*;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
/**
* Abstract base class for {@link Server} implementations.
*
* @author Christoph Deppisch
*/
public abstract class AbstractServer extends AbstractEndpoint implements Server, InitializingBean, DisposableBean, BeanFactoryAware {
/** Default channel suffix */
public static final String DEFAULT_CHANNEL_ID_SUFFIX = ".inbound";
/** Running flag */
private boolean running = false;
/** Autostart server after properties are set */
private boolean autoStart = false;
/** Thread running the server */
private Thread thread;
/** Monitor for startup and running lifecycle */
private Object runningLock = new Object();
/** Spring bean factory injected */
private BeanFactory beanFactory;
/** Message endpoint adapter for incoming requests */
private EndpointAdapter endpointAdapter;
/** Handler interceptors such as security or logging interceptors */
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy