webcontextserviceimpl.java

来自「一个实用工具类」· Java 代码 · 共 95 行

JAVA
95
字号
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file.  */package org.butor.web.context;import org.butor.context.ContextServiceImpl;import org.butor.log.Log;public class WebContextServiceImpl extends ContextServiceImpl implements IWebContextService {	/**	 * Contructor	 */	public WebContextServiceImpl() {		super();	}	/**	 * This method, called at the startup of the system, registers	 * the object with the GenericLog class to indicate that it	 * will perform the log services for the system and writes	 * a message indicating the startup	 */	public synchronized void init() {		log(Log.LOG_LEVEL_NONE, this, Log.LOG_TYPE_INFO, "init()", "Started");		// get service config.		// No config informations.		/*		IProperties serviceProps = Config.getPropertyList(			ServiceClass.PROPERTY_PREFIX_SERVICE +getServiceName());						if (serviceProps == null) {			log(				this,				Log.LOG_TYPE_ERROR,				"init()",				"Missing property list [" 					+ ServiceClass.PROPERTY_PREFIX_SERVICE +getServiceName()					+ "]");				} else {			f_x = serviceProps.getProperty();		}		*/	}	/**	 * Shutdown and free resources	 */	public void shutdown() {		unregisterFromService();		log(			Log.LOG_LEVEL_NONE,			this,			Log.LOG_TYPE_INFO,			"shutdown()",			"Stopped.");	}	/**	 * get the context related to the given key	 * 	 * @param key Objcet, key of the context to retreive	 */	public void releaseContext() {		super.releaseContext(Thread.currentThread());	}	/**	 * release the context related to the given key	 * 	 * @param key Objcet, key of the context to retreive	 */	public IWebContext getContext() {		return (IWebContext) super.getContext(Thread.currentThread());	}	/**	 * set the context related to the given key	 * 	 * @param key Objcet, key of the context to retreive	 * @param context Objcet, key of the context to retreive	 */	public void setContext( IWebContext context) {		super.setContext(Thread.currentThread(), context);	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?