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: * @(#)SecurityHndlr.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: /**
030: * SecurityHndlr.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: * Created on October 8, 2004, 6:28 PM
037: */package com.sun.jbi.internal.security;
038:
039: import com.sun.jbi.component.ComponentContext;
040:
041: /**
042: * No-op implementation of SecurityHandler.
043: *
044: * @author Sun Microsystems, Inc.
045: */
046: public class SecurityHndlr implements
047: com.sun.jbi.binding.security.SecurityHandler {
048: /** the ComponentContext. */
049: private ComponentContext mCtx;
050:
051: /**
052: * Constructor.
053: *
054: * @param compCtx is the ComponentContext
055: * @throws IllegalStateException if initialization causes the handler
056: * to be in a invalid state.
057: */
058: public SecurityHndlr(ComponentContext compCtx)
059: throws IllegalStateException {
060: initialize(compCtx);
061: }
062:
063: /**
064: * This method initializes the SecurityHndlr with the ComponentContext.
065: *
066: * @param compCtx is the ComponentContext
067: * @throws IllegalStateException if initialization causes the handler
068: * to be in a invalid state.
069: */
070: public void initialize(ComponentContext compCtx)
071: throws IllegalStateException {
072: mCtx = compCtx;
073: }
074:
075: /**
076: * Get an Instance of the Deployment Listener.
077: *
078: * @return an Instance of the Deployment Listener
079: */
080: public com.sun.jbi.binding.security.DeploymentListener getDeploymentListener() {
081: return new DeploymentListener();
082: }
083:
084: /**
085: * Get an Instance of the Interceptor.
086: *
087: * @return an Instance of the Deployment Listener
088: */
089: public com.sun.jbi.binding.security.Interceptor getInterceptor() {
090: return new Interceptor();
091: }
092:
093: /**
094: *
095: * Get the HttpSecurityHandler.
096: *
097: * @return a new Instance of the HttpSecurityHandler
098: */
099: public com.sun.jbi.binding.security.HttpSecurityHandler getHttpSecurityHandler() {
100: return new HttpSecurityHandler();
101: }
102:
103: /**
104: * Get the Name of the Component associated with the handler.
105: *
106: * @return the String Component Name.
107: */
108: public String getComponentName() {
109: if (mCtx != null) {
110: return mCtx.getComponentName();
111: } else {
112: return "";
113: }
114: }
115: }
|