001// Licensed to the Apache Software Foundation (ASF) under one 002// or more contributor license agreements. See the NOTICE file 003// distributed with this work for additional information 004// regarding copyright ownership. The ASF licenses this file 005// to you under the Apache License, Version 2.0 (the 006// "License"); you may not use this file except in compliance 007// with the License. You may obtain a copy of the License at 008// 009// http://www.apache.org/licenses/LICENSE-2.0 010// 011// Unless required by applicable law or agreed to in writing, 012// software distributed under the License is distributed on an 013// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 014// KIND, either express or implied. See the License for the 015// specific language governing permissions and limitations 016// under the License. 017 018package org.apache.tapestry5.services; 019 020/** 021 * Used by {@link ApplicationStateManager} and {@link ApplicationStatePersistenceStrategy} to create 022 * a Session State Object (SSO) on demand. 023 * <p> 024 * <em>NOTE: The term "Application" here is a hold-over from Tapestry 5.0, which used 025 * the @ApplicationState (deprecated and deleted) annotation, and called them "ASOs" 026 * (Application State Objects). This service would be better named "SessionStateCreator" 027 * (but renaming it would cause backwards compatibility issues).</em> 028 * 029 * @param <T> 030 */ 031public interface ApplicationStateCreator<T> 032{ 033 /** 034 * Create a new instance of a session state object. 035 */ 036 T create(); 037}