You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by ad...@apache.org on 2010/05/26 20:34:49 UTC

svn commit: r948527 [24/38] - in /incubator/shiro: branches/shiro-root-1.0.x/ branches/shiro-root-1.0.x/all/ branches/shiro-root-1.0.x/core/src/main/java/org/apache/shiro/ branches/shiro-root-1.0.x/core/src/main/java/org/apache/shiro/aop/ branches/shir...

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java Wed May 26 18:34:28 2010
@@ -1,122 +1,122 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.realm.text;
-
-import org.apache.shiro.config.Ini;
-import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link org.apache.shiro.realm.Realm Realm} implementation that creates
- * {@link org.apache.shiro.authc.SimpleAccount SimpleAccount} instances based on
- * {@link Ini} configuration.
- * <p/>
- * This implementation looks for two {@link Ini.Section sections} in the {@code Ini} configuration:
- * <pre>
- * [users]
- * # One or more {@link org.apache.shiro.realm.text.TextConfigurationRealm#setUserDefinitions(String) user definitions}
- * ...
- * [roles]
- * # One or more {@link org.apache.shiro.realm.text.TextConfigurationRealm#setRoleDefinitions(String) role definitions}</pre>
- * <p/>
- * This class also supports setting the {@link #setResourcePath(String) resourcePath} property to create account
- * data from an .ini resource.  This will only be used if there isn't already account data in the Realm.
- *
- * @since 1.0
- */
-public class IniRealm extends TextConfigurationRealm {
-
-    public static final String USERS_SECTION_NAME = "users";
-    public static final String ROLES_SECTION_NAME = "roles";
-
-    private static transient final Logger log = LoggerFactory.getLogger(IniRealm.class);
-
-    private String resourcePath;
-
-    public IniRealm() {
-        super();
-    }
-
-    public IniRealm(Ini ini) {
-        this();
-        processDefinitions(ini);
-    }
-
-    public IniRealm(String resourcePath) {
-        this();
-        Ini ini = Ini.fromResourcePath(resourcePath);
-        this.resourcePath = resourcePath;
-        processDefinitions(ini);
-    }
-
-    public String getResourcePath() {
-        return resourcePath;
-    }
-
-    public void setResourcePath(String resourcePath) {
-        this.resourcePath = resourcePath;
-    }
-
-    @Override
-    protected void onInit() {
-        // This is an in-memory realm only - no need for an additional cache when we're already
-        // as memory-efficient as we can be.
-        String resourcePath = getResourcePath();
-
-        if (CollectionUtils.isEmpty(this.users) && CollectionUtils.isEmpty(this.roles)) {
-            //no account data manually populated - try the resource path:
-            if (StringUtils.hasText(resourcePath)) {
-                log.debug("Resource path {} defined.  Creating INI instance.", resourcePath);
-                Ini ini = Ini.fromResourcePath(resourcePath);
-                processDefinitions(ini);
-            } else {
-                throw new IllegalStateException("No resource path was specified.  Cannot load account data.");
-            }
-        } else {
-            if (StringUtils.hasText(resourcePath)) {
-                log.warn("Users or Roles are already populated.  Resource path property will be ignored.");
-            }
-        }
-    }
-
-    private void processDefinitions(Ini ini) {
-        if (CollectionUtils.isEmpty(ini)) {
-            log.warn("{} defined, but the ini instance is null or empty.", getClass().getSimpleName());
-            return;
-        }
-
-        Ini.Section rolesSection = ini.getSection(ROLES_SECTION_NAME);
-        if (!CollectionUtils.isEmpty(rolesSection)) {
-            log.debug("Discovered the [{}] section.  Processing...", ROLES_SECTION_NAME);
-            processRoleDefinitions(rolesSection);
-        }
-
-        Ini.Section usersSection = ini.getSection(USERS_SECTION_NAME);
-        if (!CollectionUtils.isEmpty(usersSection)) {
-            log.debug("Discovered the [{}] section.  Processing...", USERS_SECTION_NAME);
-            processUserDefinitions(usersSection);
-        } else {
-            log.info("{} defined, but there is no [{}] section defined.  This realm will not be populated with any " +
-                    "users and it is assumed that they will be populated programatically.  Users must be defined " +
-                    "for this Realm instance to be useful.", getClass().getSimpleName(), USERS_SECTION_NAME);
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.realm.text;
+
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.util.CollectionUtils;
+import org.apache.shiro.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A {@link org.apache.shiro.realm.Realm Realm} implementation that creates
+ * {@link org.apache.shiro.authc.SimpleAccount SimpleAccount} instances based on
+ * {@link Ini} configuration.
+ * <p/>
+ * This implementation looks for two {@link Ini.Section sections} in the {@code Ini} configuration:
+ * <pre>
+ * [users]
+ * # One or more {@link org.apache.shiro.realm.text.TextConfigurationRealm#setUserDefinitions(String) user definitions}
+ * ...
+ * [roles]
+ * # One or more {@link org.apache.shiro.realm.text.TextConfigurationRealm#setRoleDefinitions(String) role definitions}</pre>
+ * <p/>
+ * This class also supports setting the {@link #setResourcePath(String) resourcePath} property to create account
+ * data from an .ini resource.  This will only be used if there isn't already account data in the Realm.
+ *
+ * @since 1.0
+ */
+public class IniRealm extends TextConfigurationRealm {
+
+    public static final String USERS_SECTION_NAME = "users";
+    public static final String ROLES_SECTION_NAME = "roles";
+
+    private static transient final Logger log = LoggerFactory.getLogger(IniRealm.class);
+
+    private String resourcePath;
+
+    public IniRealm() {
+        super();
+    }
+
+    public IniRealm(Ini ini) {
+        this();
+        processDefinitions(ini);
+    }
+
+    public IniRealm(String resourcePath) {
+        this();
+        Ini ini = Ini.fromResourcePath(resourcePath);
+        this.resourcePath = resourcePath;
+        processDefinitions(ini);
+    }
+
+    public String getResourcePath() {
+        return resourcePath;
+    }
+
+    public void setResourcePath(String resourcePath) {
+        this.resourcePath = resourcePath;
+    }
+
+    @Override
+    protected void onInit() {
+        // This is an in-memory realm only - no need for an additional cache when we're already
+        // as memory-efficient as we can be.
+        String resourcePath = getResourcePath();
+
+        if (CollectionUtils.isEmpty(this.users) && CollectionUtils.isEmpty(this.roles)) {
+            //no account data manually populated - try the resource path:
+            if (StringUtils.hasText(resourcePath)) {
+                log.debug("Resource path {} defined.  Creating INI instance.", resourcePath);
+                Ini ini = Ini.fromResourcePath(resourcePath);
+                processDefinitions(ini);
+            } else {
+                throw new IllegalStateException("No resource path was specified.  Cannot load account data.");
+            }
+        } else {
+            if (StringUtils.hasText(resourcePath)) {
+                log.warn("Users or Roles are already populated.  Resource path property will be ignored.");
+            }
+        }
+    }
+
+    private void processDefinitions(Ini ini) {
+        if (CollectionUtils.isEmpty(ini)) {
+            log.warn("{} defined, but the ini instance is null or empty.", getClass().getSimpleName());
+            return;
+        }
+
+        Ini.Section rolesSection = ini.getSection(ROLES_SECTION_NAME);
+        if (!CollectionUtils.isEmpty(rolesSection)) {
+            log.debug("Discovered the [{}] section.  Processing...", ROLES_SECTION_NAME);
+            processRoleDefinitions(rolesSection);
+        }
+
+        Ini.Section usersSection = ini.getSection(USERS_SECTION_NAME);
+        if (!CollectionUtils.isEmpty(usersSection)) {
+            log.debug("Discovered the [{}] section.  Processing...", USERS_SECTION_NAME);
+            processUserDefinitions(usersSection);
+        } else {
+            log.info("{} defined, but there is no [{}] section defined.  This realm will not be populated with any " +
+                    "users and it is assumed that they will be populated programatically.  Users must be defined " +
+                    "for this Realm instance to be useful.", getClass().getSimpleName(), USERS_SECTION_NAME);
+        }
+    }
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/realm/text/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/ProxiedSession.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/ProxiedSession.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/ProxiedSession.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/ProxiedSession.java Wed May 26 18:34:28 2010
@@ -1,139 +1,139 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Date;
-
-/**
- * Simple <code>Session</code> implementation that immediately delegates all corresponding calls to an
- * underlying proxied session instance.
- * <p/>
- * This class is mostly useful for framework subclassing to intercept certain <code>Session</code> calls
- * and perform additional logic.
- *
- * @author Les Hazlewood
- * @since 0.9
- */
-public class ProxiedSession implements Session {
-
-    /**
-     * The proxied instance
-     */
-    protected final Session delegate;
-
-    /**
-     * Constructs an instance that proxies the specified <code>target</code>.  Subclasses may access this
-     * target via the <code>protected final 'delegate'</code> attribute, i.e. <code>this.delegate</code>.
-     *
-     * @param target the specified target <code>Session</code> to proxy.
-     */
-    public ProxiedSession(Session target) {
-        if (target == null) {
-            throw new IllegalArgumentException("Target session to proxy cannot be null.");
-        }
-        delegate = target;
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Serializable getId() {
-        return delegate.getId();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Date getStartTimestamp() {
-        return delegate.getStartTimestamp();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Date getLastAccessTime() {
-        return delegate.getLastAccessTime();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public long getTimeout() throws InvalidSessionException {
-        return delegate.getTimeout();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public void setTimeout(long maxIdleTimeInMillis) throws InvalidSessionException {
-        delegate.setTimeout(maxIdleTimeInMillis);
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public String getHost() {
-        return delegate.getHost();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public void touch() throws InvalidSessionException {
-        delegate.touch();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public void stop() throws InvalidSessionException {
-        delegate.stop();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Collection<Object> getAttributeKeys() throws InvalidSessionException {
-        return delegate.getAttributeKeys();
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Object getAttribute(Object key) throws InvalidSessionException {
-        return delegate.getAttribute(key);
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public void setAttribute(Object key, Object value) throws InvalidSessionException {
-        delegate.setAttribute(key, value);
-    }
-
-    /**
-     * Immediately delegates to the underlying proxied session.
-     */
-    public Object removeAttribute(Object key) throws InvalidSessionException {
-        return delegate.removeAttribute(key);
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * Simple <code>Session</code> implementation that immediately delegates all corresponding calls to an
+ * underlying proxied session instance.
+ * <p/>
+ * This class is mostly useful for framework subclassing to intercept certain <code>Session</code> calls
+ * and perform additional logic.
+ *
+ * @author Les Hazlewood
+ * @since 0.9
+ */
+public class ProxiedSession implements Session {
+
+    /**
+     * The proxied instance
+     */
+    protected final Session delegate;
+
+    /**
+     * Constructs an instance that proxies the specified <code>target</code>.  Subclasses may access this
+     * target via the <code>protected final 'delegate'</code> attribute, i.e. <code>this.delegate</code>.
+     *
+     * @param target the specified target <code>Session</code> to proxy.
+     */
+    public ProxiedSession(Session target) {
+        if (target == null) {
+            throw new IllegalArgumentException("Target session to proxy cannot be null.");
+        }
+        delegate = target;
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Serializable getId() {
+        return delegate.getId();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Date getStartTimestamp() {
+        return delegate.getStartTimestamp();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Date getLastAccessTime() {
+        return delegate.getLastAccessTime();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public long getTimeout() throws InvalidSessionException {
+        return delegate.getTimeout();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public void setTimeout(long maxIdleTimeInMillis) throws InvalidSessionException {
+        delegate.setTimeout(maxIdleTimeInMillis);
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public String getHost() {
+        return delegate.getHost();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public void touch() throws InvalidSessionException {
+        delegate.touch();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public void stop() throws InvalidSessionException {
+        delegate.stop();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Collection<Object> getAttributeKeys() throws InvalidSessionException {
+        return delegate.getAttributeKeys();
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Object getAttribute(Object key) throws InvalidSessionException {
+        return delegate.getAttribute(key);
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public void setAttribute(Object key, Object value) throws InvalidSessionException {
+        delegate.setAttribute(key, value);
+    }
+
+    /**
+     * Immediately delegates to the underlying proxied session.
+     */
+    public Object removeAttribute(Object key) throws InvalidSessionException {
+        return delegate.removeAttribute(key);
+    }
+
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/ProxiedSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java Wed May 26 18:34:28 2010
@@ -1,60 +1,60 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session;
-
-/**
- * Interface to be implemented by components that wish to be notified of events that occur during a
- * {@link Session Session}'s life cycle.
- *
- * @author Les Hazlewood
- * @since 0.9
- */
-public interface SessionListener {
-
-    /**
-     * Notification callback that occurs when the corresponding Session has started.
-     *
-     * @param session the session that has started.
-     */
-    void onStart(Session session);
-
-    /**
-     * Notification callback that occurs when the corresponding Session has stopped, either programmatically via
-     * {@link Session#stop} or automatically upon a subject logging out.
-     *
-     * @param session the session that has stopped.
-     */
-    void onStop(Session session);
-
-    /**
-     * Notification callback that occurs when the corresponding Session has expired.
-     * <p/>
-     * <b>Note</b>: this method is almost never called at the exact instant that the {@code Session} expires.  Almost all
-     * session management systems, including Shiro's implementations, lazily validate sessions - either when they
-     * are accessed or during a regular validation interval.  It would be too resource intensive to monitor every
-     * single session instance to know the exact instant it expires.
-     * <p/>
-     * If you need to perform time-based logic when a session expires, it is best to write it based on the
-     * session's {@link org.apache.shiro.session.Session#getLastAccessTime() lastAccessTime} and <em>not</em> the time
-     * when this method is called.
-     *
-     * @param session the session that has expired.
-     */
-    void onExpiration(Session session);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session;
+
+/**
+ * Interface to be implemented by components that wish to be notified of events that occur during a
+ * {@link Session Session}'s life cycle.
+ *
+ * @author Les Hazlewood
+ * @since 0.9
+ */
+public interface SessionListener {
+
+    /**
+     * Notification callback that occurs when the corresponding Session has started.
+     *
+     * @param session the session that has started.
+     */
+    void onStart(Session session);
+
+    /**
+     * Notification callback that occurs when the corresponding Session has stopped, either programmatically via
+     * {@link Session#stop} or automatically upon a subject logging out.
+     *
+     * @param session the session that has stopped.
+     */
+    void onStop(Session session);
+
+    /**
+     * Notification callback that occurs when the corresponding Session has expired.
+     * <p/>
+     * <b>Note</b>: this method is almost never called at the exact instant that the {@code Session} expires.  Almost all
+     * session management systems, including Shiro's implementations, lazily validate sessions - either when they
+     * are accessed or during a regular validation interval.  It would be too resource intensive to monitor every
+     * single session instance to know the exact instant it expires.
+     * <p/>
+     * If you need to perform time-based logic when a session expires, it is best to write it based on the
+     * session's {@link org.apache.shiro.session.Session#getLastAccessTime() lastAccessTime} and <em>not</em> the time
+     * when this method is called.
+     *
+     * @param session the session that has expired.
+     */
+    void onExpiration(Session session);
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListenerAdapter.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListenerAdapter.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListenerAdapter.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListenerAdapter.java Wed May 26 18:34:28 2010
@@ -1,55 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session;
-
-/**
- * Simple adapter implementation of the {@link SessionListener} interface, effectively providing
- * no-op implementations of all methods.
- *
- * @since 1.0
- */
-public class SessionListenerAdapter implements SessionListener {
-
-    /**
-     * Adapter no-op implemenation - does nothing and returns immediately.
-     *
-     * @param session the session that has started.
-     */
-    public void onStart(Session session) {
-        //no-op
-    }
-
-    /**
-     * Adapter no-op implemenation - does nothing and returns immediately.
-     *
-     * @param session the session that has stopped.
-     */
-    public void onStop(Session session) {
-        //no-op
-    }
-
-    /**
-     * Adapter no-op implemenation - does nothing and returns immediately.
-     *
-     * @param session the session that has expired.
-     */
-    public void onExpiration(Session session) {
-        //no-op
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session;
+
+/**
+ * Simple adapter implementation of the {@link SessionListener} interface, effectively providing
+ * no-op implementations of all methods.
+ *
+ * @since 1.0
+ */
+public class SessionListenerAdapter implements SessionListener {
+
+    /**
+     * Adapter no-op implemenation - does nothing and returns immediately.
+     *
+     * @param session the session that has started.
+     */
+    public void onStart(Session session) {
+        //no-op
+    }
+
+    /**
+     * Adapter no-op implemenation - does nothing and returns immediately.
+     *
+     * @param session the session that has stopped.
+     */
+    public void onStop(Session session) {
+        //no-op
+    }
+
+    /**
+     * Adapter no-op implemenation - does nothing and returns immediately.
+     *
+     * @param session the session that has expired.
+     */
+    public void onExpiration(Session session) {
+        //no-op
+    }
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListenerAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractNativeSessionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ImmutableProxiedSession.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ImmutableProxiedSession.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ImmutableProxiedSession.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ImmutableProxiedSession.java Wed May 26 18:34:28 2010
@@ -1,108 +1,108 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session.mgt;
-
-import org.apache.shiro.session.InvalidSessionException;
-import org.apache.shiro.session.ProxiedSession;
-import org.apache.shiro.session.Session;
-
-
-/**
- * Implementation of the {@link Session Session} interface that proxies another <code>Session</code>, but does not
- * allow any 'write' operations to the underlying session. It allows 'read' operations only.
- * <p/>
- * The <code>Session</code> write operations are defined as follows.  A call to any of these methods on this
- * proxy will immediately result in an {@link InvalidSessionException} being thrown:
- * <ul>
- * <li>{@link Session#setTimeout(long) Session.setTimeout(long)}</li>
- * <li>{@link Session#touch() Session.touch()}</li>
- * <li>{@link Session#stop() Session.stop()}</li>
- * <li>{@link Session#setAttribute(Object, Object) Session.setAttribute(key,value)}</li>
- * <li>{@link Session#removeAttribute(Object) Session.removeAttribute(key)}</li>
- * </ul>
- * Any other method invocation not listed above will result in a corresponding call to the underlying <code>Session</code>.
- *
- * @author Les Hazlewood
- * @since 0.9
- */
-public class ImmutableProxiedSession extends ProxiedSession {
-
-    /**
-     * Constructs a new instance of this class proxying the specified <code>Session</code>.
-     *
-     * @param target the target <code>Session</code> to proxy.
-     */
-    public ImmutableProxiedSession(Session target) {
-        super(target);
-    }
-
-    /**
-     * Simply throws an <code>InvalidSessionException</code> indicating that this proxy is immutable.  Used
-     * only in the Session's 'write' methods documented in the top class-level JavaDoc.
-     *
-     * @throws InvalidSessionException in all cases - used by the Session 'write' method implementations.
-     */
-    protected void throwImmutableException() throws InvalidSessionException {
-        String msg = "This session is immutable and read-only - it cannot be altered.  This is usually because " +
-                "the session has been stopped or expired already.";
-        throw new InvalidSessionException(msg);
-    }
-
-    /**
-     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
-     * cases because this proxy is immutable.
-     */
-    public void setTimeout(long maxIdleTimeInMillis) throws InvalidSessionException {
-        throwImmutableException();
-    }
-
-    /**
-     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
-     * cases because this proxy is immutable.
-     */
-    public void touch() throws InvalidSessionException {
-        throwImmutableException();
-    }
-
-    /**
-     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
-     * cases because this proxy is immutable.
-     */
-    public void stop() throws InvalidSessionException {
-        throwImmutableException();
-    }
-
-    /**
-     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
-     * cases because this proxy is immutable.
-     */
-    public void setAttribute(Object key, Object value) throws InvalidSessionException {
-        throwImmutableException();
-    }
-
-    /**
-     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
-     * cases because this proxy is immutable.
-     */
-    public Object removeAttribute(Object key) throws InvalidSessionException {
-        throwImmutableException();
-        //we should never ever reach this point due to the exception being thrown.
-        throw new InternalError("This code should never execute - please report this as a bug!");
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session.mgt;
+
+import org.apache.shiro.session.InvalidSessionException;
+import org.apache.shiro.session.ProxiedSession;
+import org.apache.shiro.session.Session;
+
+
+/**
+ * Implementation of the {@link Session Session} interface that proxies another <code>Session</code>, but does not
+ * allow any 'write' operations to the underlying session. It allows 'read' operations only.
+ * <p/>
+ * The <code>Session</code> write operations are defined as follows.  A call to any of these methods on this
+ * proxy will immediately result in an {@link InvalidSessionException} being thrown:
+ * <ul>
+ * <li>{@link Session#setTimeout(long) Session.setTimeout(long)}</li>
+ * <li>{@link Session#touch() Session.touch()}</li>
+ * <li>{@link Session#stop() Session.stop()}</li>
+ * <li>{@link Session#setAttribute(Object, Object) Session.setAttribute(key,value)}</li>
+ * <li>{@link Session#removeAttribute(Object) Session.removeAttribute(key)}</li>
+ * </ul>
+ * Any other method invocation not listed above will result in a corresponding call to the underlying <code>Session</code>.
+ *
+ * @author Les Hazlewood
+ * @since 0.9
+ */
+public class ImmutableProxiedSession extends ProxiedSession {
+
+    /**
+     * Constructs a new instance of this class proxying the specified <code>Session</code>.
+     *
+     * @param target the target <code>Session</code> to proxy.
+     */
+    public ImmutableProxiedSession(Session target) {
+        super(target);
+    }
+
+    /**
+     * Simply throws an <code>InvalidSessionException</code> indicating that this proxy is immutable.  Used
+     * only in the Session's 'write' methods documented in the top class-level JavaDoc.
+     *
+     * @throws InvalidSessionException in all cases - used by the Session 'write' method implementations.
+     */
+    protected void throwImmutableException() throws InvalidSessionException {
+        String msg = "This session is immutable and read-only - it cannot be altered.  This is usually because " +
+                "the session has been stopped or expired already.";
+        throw new InvalidSessionException(msg);
+    }
+
+    /**
+     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
+     * cases because this proxy is immutable.
+     */
+    public void setTimeout(long maxIdleTimeInMillis) throws InvalidSessionException {
+        throwImmutableException();
+    }
+
+    /**
+     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
+     * cases because this proxy is immutable.
+     */
+    public void touch() throws InvalidSessionException {
+        throwImmutableException();
+    }
+
+    /**
+     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
+     * cases because this proxy is immutable.
+     */
+    public void stop() throws InvalidSessionException {
+        throwImmutableException();
+    }
+
+    /**
+     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
+     * cases because this proxy is immutable.
+     */
+    public void setAttribute(Object key, Object value) throws InvalidSessionException {
+        throwImmutableException();
+    }
+
+    /**
+     * Immediately {@link #throwImmutableException() throws} an <code>InvalidSessionException</code> in all
+     * cases because this proxy is immutable.
+     */
+    public Object removeAttribute(Object key) throws InvalidSessionException {
+        throwImmutableException();
+        //we should never ever reach this point due to the exception being thrown.
+        throw new InternalError("This code should never execute - please report this as a bug!");
+    }
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ImmutableProxiedSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/NativeSessionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionFactory.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionFactory.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionFactory.java Wed May 26 18:34:28 2010
@@ -1,43 +1,43 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session.mgt;
-
-import org.apache.shiro.session.Session;
-
-/**
- * A simple factory class that instantiates concrete {@link Session Session} instances.  This is mainly a
- * mechanism to allow instances to be created at runtime if they need to be different the
- * defaults.  It is not used by end-users of the framework, but rather those configuring Shiro to work in an
- * application, and is typically injected into the {@link org.apache.shiro.mgt.SecurityManager SecurityManager} or a
- * {@link SessionManager}.
- *
- * @author Les Hazlewood
- * @since 1.0
- */
-public interface SessionFactory {
-
-    /**
-     * Creates a new {@code Session} instance based on the specified contextual initialization data.
-     *
-     * @param initData the initialization data to be used during {@link Session} creation.
-     * @return a new {@code Session} instance.
-     * @since 1.0
-     */
-    Session createSession(SessionContext initData);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session.mgt;
+
+import org.apache.shiro.session.Session;
+
+/**
+ * A simple factory class that instantiates concrete {@link Session Session} instances.  This is mainly a
+ * mechanism to allow instances to be created at runtime if they need to be different the
+ * defaults.  It is not used by end-users of the framework, but rather those configuring Shiro to work in an
+ * application, and is typically injected into the {@link org.apache.shiro.mgt.SecurityManager SecurityManager} or a
+ * {@link SessionManager}.
+ *
+ * @author Les Hazlewood
+ * @since 1.0
+ */
+public interface SessionFactory {
+
+    /**
+     * Creates a new {@code Session} instance based on the specified contextual initialization data.
+     *
+     * @param initData the initialization data to be used during {@link Session} creation.
+     * @return a new {@code Session} instance.
+     * @since 1.0
+     */
+    Session createSession(SessionContext initData);
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SessionKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java Wed May 26 18:34:28 2010
@@ -1,47 +1,47 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session.mgt;
-
-import org.apache.shiro.session.Session;
-
-/**
- * {@code SessionFactory} implementation that generates {@link SimpleSession} instances.
- *
- * @author Les Hazlewood
- * @since 1.0
- */
-public class SimpleSessionFactory implements SessionFactory {
-
-    /**
-     * Creates a new {@link SimpleSession SimpleSession} instance retaining the context's
-     * {@link SessionContext#getHost() host} if one can be found.
-     *
-     * @param initData the initialization data to be used during {@link Session} creation.
-     * @return a new {@link SimpleSession SimpleSession} instance
-     */
-    public Session createSession(SessionContext initData) {
-        if (initData != null) {
-            String host = initData.getHost();
-            if (host != null) {
-                return new SimpleSession(host);
-            }
-        }
-        return new SimpleSession();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session.mgt;
+
+import org.apache.shiro.session.Session;
+
+/**
+ * {@code SessionFactory} implementation that generates {@link SimpleSession} instances.
+ *
+ * @author Les Hazlewood
+ * @since 1.0
+ */
+public class SimpleSessionFactory implements SessionFactory {
+
+    /**
+     * Creates a new {@link SimpleSession SimpleSession} instance retaining the context's
+     * {@link SessionContext#getHost() host} if one can be found.
+     *
+     * @param initData the initialization data to be used during {@link Session} creation.
+     * @return a new {@link SimpleSession SimpleSession} instance
+     */
+    public Session createSession(SessionContext initData) {
+        if (initData != null) {
+            String host = initData.getHost();
+            if (host != null) {
+                return new SimpleSession(host);
+            }
+        }
+        return new SimpleSession();
+    }
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ValidatingSession.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ValidatingSession.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ValidatingSession.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ValidatingSession.java Wed May 26 18:34:28 2010
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.session.mgt;
-
-import org.apache.shiro.session.InvalidSessionException;
-import org.apache.shiro.session.Session;
-
-
-/**
- * A <code>ValidatingSession</code> is a <code>Session</code> that is capable of determining it is valid or not and
- * is able to validate itself if necessary.
- * <p/>
- * Validation is usually an exercise of determining when the session was last accessed or modified and determining if
- * that time is longer than a specified allowed duration.
- * 
- * @author Les Hazlewood
- * @since 0.9
- */
-public interface ValidatingSession extends Session {
-
-    boolean isValid();
-
-    void validate() throws InvalidSessionException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.session.mgt;
+
+import org.apache.shiro.session.InvalidSessionException;
+import org.apache.shiro.session.Session;
+
+
+/**
+ * A <code>ValidatingSession</code> is a <code>Session</code> that is capable of determining it is valid or not and
+ * is able to validate itself if necessary.
+ * <p/>
+ * Validation is usually an exercise of determining when the session was last accessed or modified and determining if
+ * that time is longer than a specified allowed duration.
+ * 
+ * @author Les Hazlewood
+ * @since 0.9
+ */
+public interface ValidatingSession extends Session {
+
+    boolean isValid();
+
+    void validate() throws InvalidSessionException;
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/ValidatingSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/AbstractSessionDAO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/CachingSessionDAO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/EnterpriseCacheSessionDAO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/JavaUuidSessionIdGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/RandomSessionIdGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/SessionIdGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/eis/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/ExecutionException.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/ExecutionException.java?rev=948527&r1=948526&r2=948527&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/ExecutionException.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/ExecutionException.java Wed May 26 18:34:28 2010
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.shiro.subject;
-
-import org.apache.shiro.ShiroException;
-
-/**
- * Exception wrapping any potential checked exception thrown when a {@code Subject} executes a
- * {@link java.util.concurrent.Callable}.  This is a nicer alternative than forcing calling code to catch
- * a normal checked {@code Exception} when it may not be necessary.
- * <p/>
- * If thrown, the causing exception will always be accessible via the {@link #getCause() getCause()} method.
- *
- * @since 1.0
- */
-public class ExecutionException extends ShiroException {
-
-    public ExecutionException(Throwable cause) {
-        super(cause);
-    }
-
-    public ExecutionException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.shiro.subject;
+
+import org.apache.shiro.ShiroException;
+
+/**
+ * Exception wrapping any potential checked exception thrown when a {@code Subject} executes a
+ * {@link java.util.concurrent.Callable}.  This is a nicer alternative than forcing calling code to catch
+ * a normal checked {@code Exception} when it may not be necessary.
+ * <p/>
+ * If thrown, the causing exception will always be accessible via the {@link #getCause() getCause()} method.
+ *
+ * @since 1.0
+ */
+public class ExecutionException extends ShiroException {
+
+    public ExecutionException(Throwable cause) {
+        super(cause);
+    }
+
+    public ExecutionException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/ExecutionException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/MutablePrincipalCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/PrincipalCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native