KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mortbay > j2ee > session > DebugInterceptor


1 // ========================================================================
2
// $Id: DebugInterceptor.java,v 1.4 2004/05/09 20:30:47 gregwilkins Exp $
3
// Copyright 2002-2004 Mort Bay Consulting Pty. Ltd.
4
// ------------------------------------------------------------------------
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
// ========================================================================
15

16 package org.mortbay.j2ee.session;
17
18 //----------------------------------------
19

20 import java.rmi.RemoteException JavaDoc;
21 import java.util.Enumeration JavaDoc;
22 import java.util.Map JavaDoc;
23
24 import org.jfox.ioc.logger.Logger;
25
26 //----------------------------------------
27
/**
28  *
29  * @author <a HREF="mailto:jules@mortbay.com">Jules Gosnell</a>
30  * @version 1.0
31  */

32 public class
33   DebugInterceptor
34   extends StateInterceptor
35 {
36   protected static final Logger _log=Logger.getLogger(DebugInterceptor.class);
37
38   // invariant field accessors
39
public String JavaDoc
40     getId()
41     throws RemoteException JavaDoc
42     {
43       _log.info("getId() -> ()");
44       String JavaDoc tmp=super.getId();
45       _log.info("getId() <- "+tmp);
46       return tmp;
47     }
48
49   public int
50     getActualMaxInactiveInterval()
51     throws RemoteException JavaDoc
52     {
53       _log.info("getActualMaxInactiveInterval() -> ()");
54       int tmp=super.getActualMaxInactiveInterval();
55       _log.info("getActualMaxInactiveInterval() <- "+tmp);
56       return tmp;
57     }
58
59   public long
60     getCreationTime()
61     throws RemoteException JavaDoc
62     {
63       _log.info("getCreationTime() -> ()");
64       long tmp=super.getCreationTime();
65       _log.info("getCreationTime() <- "+tmp);
66       return tmp;
67     }
68
69
70   // variant field accessors
71
public Map JavaDoc
72     getAttributes()
73     throws RemoteException JavaDoc
74     {
75       _log.info("getAttributes() -> ()");
76       Map JavaDoc tmp=super.getAttributes();
77       _log.info("getAttributes() <- "+tmp);
78       return tmp;
79     }
80
81   public void
82     setAttributes(Map JavaDoc attributes)
83     throws RemoteException JavaDoc
84     {
85       _log.info("setAttributes() -> ("+attributes+")");
86       super.setAttributes(attributes);
87       _log.info("setAttributes() <- ");
88     }
89
90   public long
91     getLastAccessedTime()
92     throws RemoteException JavaDoc
93     {
94       _log.info("getLastAccessedTime() -> ()");
95       long tmp=super.getLastAccessedTime();
96       _log.info("getLastAccessedTime() <- "+tmp);
97       return tmp;
98     }
99
100   public void
101     setLastAccessedTime(long time)
102     throws RemoteException JavaDoc
103     {
104       _log.info("setLastAccessedTime() -> ("+time+")");
105       super.setLastAccessedTime(time);
106       _log.info("setLastAccessedTime() <- ");
107     }
108
109   public int
110     getMaxInactiveInterval()
111     throws RemoteException JavaDoc
112     {
113       _log.info("getMaxInactiveInterval() -> ()");
114       int tmp=super.getMaxInactiveInterval();
115       _log.info("getMaxInactiveInterval() <- "+tmp);
116       return tmp;
117     }
118
119   public void
120     setMaxInactiveInterval(int interval)
121     throws RemoteException JavaDoc
122     {
123       _log.info("setMaxInactiveInterval() -> ("+interval+")");
124       super.setMaxInactiveInterval(interval);
125       _log.info("setMaxInactiveInterval() <- ");
126     }
127
128
129   // compound fn-ality
130
public Object JavaDoc
131     getAttribute(String JavaDoc name)
132     throws RemoteException JavaDoc
133     {
134       _log.info("getAttribute() -> ("+name+")");
135       Object JavaDoc tmp=super.getAttribute(name);
136       _log.info("getAttribute() <- "+tmp);
137       return tmp;
138     }
139
140   public Object JavaDoc
141     setAttribute(String JavaDoc name, Object JavaDoc value, boolean returnValue)
142     throws RemoteException JavaDoc
143     {
144       _log.info("setAttribute() -> ("+name+","+value+","+returnValue+")");
145       Object JavaDoc tmp=super.setAttribute(name,value,returnValue);
146       _log.info("setAttribute() <- "+tmp);
147       return tmp;
148     }
149
150   public Object JavaDoc
151     removeAttribute(String JavaDoc name, boolean returnValue)
152     throws RemoteException JavaDoc
153     {
154       _log.info("removeAttribute() -> ("+name+","+returnValue+")");
155       Object JavaDoc tmp=super.removeAttribute(name,returnValue);
156       _log.info("removeAttribute() <- "+tmp);
157       return tmp;
158     }
159
160   public Enumeration JavaDoc
161     getAttributeNameEnumeration()
162     throws RemoteException JavaDoc
163     {
164       _log.info("getAttributeNameEnumeration() -> ()");
165       Enumeration JavaDoc tmp=super.getAttributeNameEnumeration();
166       _log.info("getAttributeNameEnumeration() <- "+tmp);
167       return tmp;
168     }
169
170   public String JavaDoc[]
171     getAttributeNameStringArray()
172     throws RemoteException JavaDoc
173     {
174       _log.info("getAttributeNameStringArray() -> ()");
175       String JavaDoc[] tmp=super.getAttributeNameStringArray();
176       _log.info("getAttributeNameStringArray() <- "+tmp);
177       return tmp;
178     }
179
180   public boolean
181     isValid()
182     throws RemoteException JavaDoc
183     {
184       _log.info("isValid() -> ()");
185       boolean tmp=super.isValid();
186       _log.info("isValid() <- "+tmp);
187       return tmp;
188     }
189
190   // public Object clone() { return this; } // Stateless
191
}
192
Popular Tags