001 // Copyright 2004, 2005 The Apache Software Foundation 002 // 003 // Licensed under the Apache License, Version 2.0 (the "License"); 004 // you may not use this file except in compliance with the License. 005 // You may obtain a copy of the License at 006 // 007 // http://www.apache.org/licenses/LICENSE-2.0 008 // 009 // Unless required by applicable law or agreed to in writing, software 010 // distributed under the License is distributed on an "AS IS" BASIS, 011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012 // See the License for the specific language governing permissions and 013 // limitations under the License. 014 015 package org.apache.tapestry.event; 016 017 import java.util.EventObject; 018 019 import org.apache.tapestry.IPage; 020 import org.apache.tapestry.IRequestCycle; 021 022 /** 023 * Encapsulates information related to the page listener interfaces. 024 * 025 * @author Howard Lewis Ship 026 * @since 1.0.5 027 */ 028 029 public class PageEvent extends EventObject 030 { 031 032 private static final long serialVersionUID = -6167989946862112436L; 033 034 private transient IPage _page; 035 private transient IRequestCycle _requestCycle; 036 037 /** 038 * Constructs a new instance of the event. The 039 * {@link EventObject#getSource()} of the event will be the {@link IPage}. 040 */ 041 042 public PageEvent(IPage page, IRequestCycle cycle) 043 { 044 super(page); 045 046 this._page = page; 047 this._requestCycle = cycle; 048 } 049 050 public IPage getPage() 051 { 052 return _page; 053 } 054 055 public IRequestCycle getRequestCycle() 056 { 057 return _requestCycle; 058 } 059 }