Author: anil.saldhana(a)jboss.com
Date: 2008-07-10 13:48:16 -0400 (Thu, 10 Jul 2008)
New Revision: 15
Added:
trunk/identity-api/src/main/java/org/jboss/identity/api/session/
trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java
Log:
JBID-6: session api
Added: trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java
===================================================================
--- trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java
(rev 0)
+++
trunk/identity-api/src/main/java/org/jboss/identity/api/session/Session.java 2008-07-10
17:48:16 UTC (rev 15)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.identity.api.session;
+
+import org.jboss.identity.api.exception.IdentityException;
+
+/**
+ * <p>An Identity Session</p>
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Jul 10, 2008
+ */
+public interface Session
+{
+ /**
+ * Open the session
+ * @throws IdentityException
+ */
+ void open() throws IdentityException;
+
+ /**
+ * Close this session
+ * @throws IdentityException
+ */
+ void close() throws IdentityException;
+
+ /**
+ * Save all pending changes
+ * @throws IdentityException
+ */
+ void save() throws IdentityException;
+
+ /**
+ * Clear this session
+ * @throws IdentityException
+ */
+ void clear() throws IdentityException;
+
+ /**
+ * Check if this session is open
+ * @return
+ */
+ boolean isOpen();
+}
\ No newline at end of file