Source Code Cross Referenced for SecurityService.java in  » ESB » open-esb » com » sun » jbi » internal » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » open esb » com.sun.jbi.internal.security 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * BEGIN_HEADER - DO NOT EDIT
003:         *
004:         * The contents of this file are subject to the terms
005:         * of the Common Development and Distribution License
006:         * (the "License").  You may not use this file except
007:         * in compliance with the License.
008:         *
009:         * You can obtain a copy of the license at
010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011:         * See the License for the specific language governing
012:         * permissions and limitations under the License.
013:         *
014:         * When distributing Covered Code, include this CDDL
015:         * HEADER in each file and include the License file at
016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017:         * If applicable add the following below this CDDL HEADER,
018:         * with the fields enclosed by brackets "[]" replaced with
019:         * your own identifying information: Portions Copyright
020:         * [year] [name of copyright owner]
021:         */
022:
023:        /*
024:         * @(#)SecurityService.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:        /**
030:         *  SecurityService.java
031:         *
032:         *  SUN PROPRIETARY/CONFIDENTIAL.
033:         *  This software is the proprietary information of Sun Microsystems, Inc.
034:         *  Use is subject to license terms.
035:         *
036:         */package com.sun.jbi.internal.security;
037:
038:        import com.sun.jbi.binding.security.SecurityHandler;
039:        import com.sun.jbi.component.ComponentContext;
040:        import java.util.HashMap;
041:        import javax.jbi.JBIException;
042:        import javax.management.MBeanServer;
043:        import javax.management.StandardMBean;
044:        import javax.management.ObjectName;
045:
046:        /**
047:         * Implementation of the SecurityService interface.
048:         *
049:         * @author Sun Microsystems, Inc.
050:         */
051:        public final class SecurityService extends
052:                com.sun.jbi.management.system.ModelSystemService implements 
053:                com.sun.jbi.binding.security.SecurityService,
054:                com.sun.jbi.ServiceLifecycle
055:
056:        {
057:
058:            /**
059:             * The registry of ( ComponnetID: SecurityHandlers )
060:             */
061:            private HashMap mSecurityHandlers;
062:
063:            /**
064:             * My Single Instance
065:             */
066:            private static SecurityService sInstance;
067:
068:            /**
069:             * The Environment Context.
070:             */
071:            private com.sun.jbi.EnvironmentContext mEnvCtx;
072:
073:            /** 
074:             * Ctor.
075:             */
076:            public SecurityService() {
077:                mSecurityHandlers = new HashMap();
078:            }
079:
080:            /**
081:             * Get a instance of the Service. 
082:             * TBD::
083:             *
084:             * @return a SecurityService instance
085:             */
086:            public static SecurityService getInstance() {
087:                if (sInstance == null) {
088:                    sInstance = new SecurityService();
089:                }
090:                return sInstance;
091:            }
092:
093:            /**
094:             * Create a SecurityHandler based on the SecurityConfiguration.
095:             *
096:             * @param compCtx is the ComponentContext of the Binding Component associated
097:             * with the Securityhandler
098:             * @param authLayer is the type of layer that requires to use the security services.
099:             * @return a instance of the newly created SecurityHandler
100:             * @throws IllegalStateException if the SecurityHandler is in a invalid
101:             * state on creation.
102:             */
103:            public SecurityHandler createSecurityHandler(
104:                    ComponentContext compCtx, String authLayer)
105:                    throws IllegalStateException {
106:                SecurityHandler secHandler = new SecurityHndlr(compCtx);
107:                if (compCtx != null) {
108:                    mSecurityHandlers.put(compCtx.getComponentName(),
109:                            secHandler);
110:                }
111:                return secHandler;
112:            }
113:
114:            /**
115:             * Create a SecurityHandler.
116:             *
117:             * @param compCtx the ComponentContext of the Binding Component associated
118:             * with the Securityhandler.
119:             * @return a instance of the newly created SecurityHandler
120:             * @throws IllegalStateException if the SecurityHandler is in a invalid
121:             * state on creation.
122:             */
123:            public SecurityHandler createSecurityHandler(
124:                    ComponentContext compCtx) throws IllegalStateException {
125:
126:                return this .createSecurityHandler(compCtx, "SOAP");
127:            }
128:
129:            /**
130:             * Get the SecurityHandler for a Component.
131:             *
132:             * @param componentId is the Component Id
133:             * @return a instance of the components SecurityHandler, if it exists null otherwise.
134:             */
135:            public SecurityHandler getSecurityHandler(String componentId) {
136:                return (SecurityHandler) mSecurityHandlers.get(componentId);
137:            }
138:
139:            /**
140:             * Remove the SecurityHandler for the component, this method should be called when 
141:             * the component is shutdown or uninstalled.
142:             *
143:             * @param componentId is the Component Id
144:             */
145:            public void removeSecurityHandler(String componentId) {
146:                mSecurityHandlers.remove(componentId);
147:            }
148:
149:            /**
150:             * Initialize the Service.
151:             *
152:             * @param aContext is the Environment Context.
153:             */
154:            public void initService(com.sun.jbi.EnvironmentContext aContext)
155:                    throws javax.jbi.JBIException {
156:                mEnvCtx = aContext;
157:
158:                //-- no-op
159:            }
160:
161:            /**
162:             * Start the Service.
163:             */
164:            public void startService() throws javax.jbi.JBIException {
165:                //-- no-op
166:            }
167:
168:            /**
169:             * Stop the security service.
170:             */
171:            public void stopService() throws javax.jbi.JBIException {
172:                //-- no-op
173:            }
174:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.