[jboss-cvs] JBossAS SVN: r71733 - projects/security/security-spi/trunk/spi/src/main/org/jboss/security.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 4 16:49:02 EDT 2008


Author: sguilhen at redhat.com
Date: 2008-04-04 16:49:02 -0400 (Fri, 04 Apr 2008)
New Revision: 71733

Added:
   projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SubjectFactory.java
Log:
JBAS-5362: Added the SubjectFactory interface. The JCA connection manager will use an injected implementation of this interface to get the Subject that must be used for establishing a secure connection.



Added: projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SubjectFactory.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SubjectFactory.java	                        (rev 0)
+++ projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SubjectFactory.java	2008-04-04 20:49:02 UTC (rev 71733)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.security;
+
+import javax.security.auth.Subject;
+
+/**
+ * <p>
+ * This interface represents a factory for {@code Subject}s. Implementations are responsible for creating and
+ * populating a {@code Subject} object with the relevant information.
+ * </p>
+ * 
+ * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
+ */
+public interface SubjectFactory
+{
+
+   /**
+    * <p>
+    * The {@code Subject} factory method. Implementations will construct the {@code Subject} object and insert all
+    * relevant information like credentials, roles, etc into the created object.
+    * </p>
+    * 
+    * @return a reference to the constructed {@code Subject} object.
+    */
+   public Subject createSubject();
+}




More information about the jboss-cvs-commits mailing list