Skip to Content.
Sympa Menu

notify-dpml - r1072 - in trunk/main/planet/web/server: . etc/prefs src/main/net/dpml/web/server

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1072 - in trunk/main/planet/web/server: . etc/prefs src/main/net/dpml/web/server
  • Date: Sun, 12 Feb 2006 02:26:43 +0100

Author: mcconnell
Date: 2006-02-12 02:26:34 +0100 (Sun, 12 Feb 2006)
New Revision: 1072

Added:

trunk/main/planet/web/server/src/main/net/dpml/web/server/ConnectorContext.java
trunk/main/planet/web/server/src/main/net/dpml/web/server/Scheme.java

trunk/main/planet/web/server/src/main/net/dpml/web/server/SelectChannelConnector.java
Removed:
trunk/main/planet/web/server/etc/prefs/xmls/
Modified:
trunk/main/planet/web/server/build.xml
trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java

trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
Log:
1. add an SSL connector component
2. add an standard select channel connector component
3. remove the redundant XML configuration data
4. update the server to select connectors from internal parts

Modified: trunk/main/planet/web/server/build.xml
===================================================================
--- trunk/main/planet/web/server/build.xml 2006-02-11 23:01:05 UTC (rev
1071)
+++ trunk/main/planet/web/server/build.xml 2006-02-12 01:26:34 UTC (rev
1072)
@@ -60,6 +60,18 @@
</services>
</type>

+ <type xmlns="metro" class="net.dpml.web.server.SelectChannelConnector"
threadsafe="true" name="sc-connector">
+ <services>
+ <service class="org.mortbay.jetty.Connector"/>
+ </services>
+ </type>
+
+ <type xmlns="metro" class="net.dpml.web.server.SslSocketConnector"
threadsafe="true" name="ssl">
+ <services>
+ <service class="org.mortbay.jetty.Connector"/>
+ </services>
+ </type>
+
<type xmlns="metro" name="server" class="net.dpml.web.server.Server"
threadsafe="true" collection="hard">
<services>
<service class="net.dpml.web.server.Server"/>
@@ -105,7 +117,29 @@

<component xmlns="metro" type="net.dpml.web.server.Server"
lifestyle="singleton">
<parts>
+ <!--
+ Add a select channel connector to 8080.
+ -->
+ <component key="plain"
type="net.dpml.web.server.SelectChannelConnector">
+ <context>
+ <entry key="port" value="8080"/>
+ <entry key="maxIdleTime" value="50000"/>
+ <entry key="acceptors" value="10"/>
+ </context>
+ </component>
<!--
+ Add a SSL connector to 8443.
+ -->
+ <component key="ssl" type="net.dpml.web.server.SslSocketConnector">
+ <context>
+ <entry key="port" value="8443"/>
+ <entry key="maxIdleTime" value="30000"/>
+ <entry key="keystore"
value="local:keystore:dpml/planet/web/jetty"/>
+ <entry key="password"
value="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/>
+ <entry key="keyPassword" value="OBF:1u2u1wml1z7s1z7a1wnl1u2g"/>
+ </context>
+ </component>
+ <!--
Add a user realm.
-->
<component key="realm" type="net.dpml.web.server.HashUserRealm">
@@ -115,7 +149,7 @@
</context>
</component>
<!--
- Add an experimental web app.
+ Add an web app.
-->
<component key="apps"
type="net.dpml.web.server.WebAppContextHandler">
<context>

Added:
trunk/main/planet/web/server/src/main/net/dpml/web/server/ConnectorContext.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/ConnectorContext.java
2006-02-11 23:01:05 UTC (rev 1071)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/ConnectorContext.java
2006-02-12 01:26:34 UTC (rev 1072)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2006 Stephen McConnell.
+ *
+ * Licensed 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 net.dpml.web.server;
+
+/**
+ * Common connector context contract.
+ */
+public interface ConnectorContext
+{
+ /**
+ * Return the connector host name.
+ * @param host implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getHost( String host );
+
+ /**
+ * Return the connector port.
+ * @return the assigned connector port
+ */
+ int getPort();
+
+ /**
+ * Return the connector header buffer size.
+ * @param size implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getHeaderBufferSize( int size );
+
+ /**
+ * Return the maximum idle time in milliseconds.
+ * @param time implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getMaxIdleTime( int time );
+
+ /**
+ * Return the request buffer size.
+ * @param size implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getRequestBufferSize( int size );
+
+ /**
+ * Return the response buffer size.
+ * @param size implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getResponseBufferSize( int size );
+
+ /**
+ * Return the accept queue size.
+ * @param size implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getAcceptQueueSize( int size );
+
+ /**
+ * Return the number of inital acceptors.
+ * @param size implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getAcceptors( int size );
+
+ /**
+ * Return the soLingerTime parameter value.
+ * @param time implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getSoLingerTime( int time );
+
+ /**
+ * Return the confidential port.
+ * @param port implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getConfidentialPort( int port );
+
+ /**
+ * Return the confidential scheme (http or https).
+ * @param scheme implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getConfidentialScheme( String scheme );
+
+ /**
+ * Return the integral port.
+ * @param port implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ int getIntegralPort( int port );
+
+ /**
+ * Return the integral scheme (http or https).
+ * @param scheme implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getIntegralScheme( String scheme );
+
+}

Added: trunk/main/planet/web/server/src/main/net/dpml/web/server/Scheme.java
===================================================================
--- trunk/main/planet/web/server/src/main/net/dpml/web/server/Scheme.java
2006-02-11 23:01:05 UTC (rev 1071)
+++ trunk/main/planet/web/server/src/main/net/dpml/web/server/Scheme.java
2006-02-12 01:26:34 UTC (rev 1072)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2004 Stephen J. McConnell.
+ * Copyright 1999-2004 The Apache Software Foundation
+ *
+ * Licensed 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 net.dpml.web.server;
+
+import net.dpml.lang.Enum;
+
+/**
+ * HTTP scheme enumeration.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+final class Scheme extends Enum
+{
+ //-------------------------------------------------------------------
+ // static
+ //-------------------------------------------------------------------
+
+ /**
+ * Serial version identifier.
+ */
+ static final long serialVersionUID = 1L;
+
+ /**
+ * Weak collection policy.
+ */
+ public static final Scheme HTTP = new Scheme( "http" );
+
+ /**
+ * Soft collection policy.
+ */
+ public static final Scheme HTTPS = new Scheme( "https" );
+
+ /**
+ * Array of static http schemes.
+ */
+ private static final Scheme[] ENUM_VALUES =
+ new Scheme[]{HTTP, HTTPS};
+
+ /**
+ * Returns an array of activation enum values.
+ * @return the activation policies array
+ */
+ public static Scheme[] values()
+ {
+ return ENUM_VALUES;
+ }
+
+ /**
+ * Internal constructor.
+ * @param label the enumeration label.
+ */
+ private Scheme( String label )
+ {
+ super( label );
+ }
+
+ /**
+ * Parse the supplied name.
+ * @param value the value to parse
+ * @return the collection policy
+ */
+ public static Scheme parse( String value )
+ {
+ if( value.equalsIgnoreCase( "HTTP" ) )
+ {
+ return HTTP;
+ }
+ else if( value.equalsIgnoreCase( "HTTPS" ) )
+ {
+ return HTTPS;
+ }
+ else
+ {
+ final String error =
+ "Unrecognized scheme [" + value + "]";
+ throw new IllegalArgumentException( error );
+ }
+ }
+}

Added:
trunk/main/planet/web/server/src/main/net/dpml/web/server/SelectChannelConnector.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/SelectChannelConnector.java
2006-02-11 23:01:05 UTC (rev 1071)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/SelectChannelConnector.java
2006-02-12 01:26:34 UTC (rev 1072)
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2006 Stephen McConnell.
+ *
+ * Licensed 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 net.dpml.web.server;
+
+/**
+ * Thread pool implementation.
+ */
+public class SelectChannelConnector extends
org.mortbay.jetty.nio.SelectChannelConnector
+{
+ private static final int HEADER_BUFFER_SIZE = 4*1024;
+ private static final int REQUEST_BUFFER_SIZE = 8*1024;
+ private static final int RESPONSE_BUFFER_SIZE = 32*1024;
+ private static final int MAXIMUM_IDLE_TIME = 30000;
+ private static final int ACCEPT_QUEUE_SIZE = 0;
+ private static final int ACCEPTORS = 1;
+ private static final int SO_LINGER_TIME = 1000;
+ private static final int CONFIDENTIAL_PORT = 0;
+ private static final int INTEGRAL_PORT = 0;
+ private static final boolean ASSUME_SHORT_DISPATCH = false;
+
+ /**
+ * Select channel context definition.
+ */
+ public interface Context extends ConnectorContext
+ {
+ /**
+ * Return the policy concerning short dispatch.
+ * @param flag implementation defined default value
+ * @return the supplied policy unless overriden in the deployment
configuration
+ */
+ boolean getAssumeShortDispatch( boolean flag );
+ }
+
+ /**
+ * Creation of a new <tt>SelectChannelConnector</tt>.
+ * @param context the component context
+ * @exception Exception if a component configuration error occurs
+ */
+ public SelectChannelConnector( Context context ) throws Exception
+ {
+ super();
+
+ String host = context.getHost( null );
+ if( null != host )
+ {
+ setHost( host );
+ }
+
+ int port = context.getPort();
+ setPort( port );
+
+ int headerBufferSize = context.getHeaderBufferSize(
HEADER_BUFFER_SIZE );
+ setHeaderBufferSize( headerBufferSize );
+
+ int requestBufferSize = context.getRequestBufferSize(
REQUEST_BUFFER_SIZE );
+ setRequestBufferSize( requestBufferSize );
+
+ int responseBufferSize = context.getResponseBufferSize(
RESPONSE_BUFFER_SIZE );
+ setResponseBufferSize( responseBufferSize );
+
+ int maxIdle = context.getMaxIdleTime( MAXIMUM_IDLE_TIME );
+ setMaxIdleTime( maxIdle );
+
+ int queueSize = context.getAcceptQueueSize( ACCEPT_QUEUE_SIZE );
+ setAcceptQueueSize( queueSize );
+
+ int acceptCount = context.getAcceptors( ACCEPTORS );
+ setAcceptors( acceptCount );
+
+ int linger = context.getSoLingerTime( SO_LINGER_TIME );
+ setSoLingerTime( linger );
+
+ int confidentialPort = context.getConfidentialPort(
CONFIDENTIAL_PORT );
+ setConfidentialPort( confidentialPort );
+
+ Scheme confidentialScheme = Scheme.parse(
context.getConfidentialScheme( "https" ) );
+ setConfidentialScheme( confidentialScheme.getName() );
+
+ int integralPort = context.getIntegralPort( INTEGRAL_PORT );
+ setIntegralPort( integralPort );
+
+ Scheme integralScheme = Scheme.parse( context.getIntegralScheme(
"https" ) );
+ setIntegralScheme( integralScheme.getName() );
+
+ // SelectChannelConnector$Context
+
+ boolean flag = context.getAssumeShortDispatch( ASSUME_SHORT_DISPATCH
);
+ setAssumeShortDispatch( flag );
+ }
+}

Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
===================================================================
--- trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
2006-02-11 23:01:05 UTC (rev 1071)
+++ trunk/main/planet/web/server/src/main/net/dpml/web/server/Server.java
2006-02-12 01:26:34 UTC (rev 1072)
@@ -26,13 +26,14 @@
import net.dpml.metro.ComponentHandler;
import net.dpml.part.Provider;

-import org.mortbay.thread.ThreadPool;
-import org.mortbay.jetty.RequestLog;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.RequestLog;
-import org.mortbay.xml.XmlConfiguration;
-import org.mortbay.util.LazyList;
-import org.mortbay.jetty.security.UserRealm;
+import org.mortbay.thread.ThreadPool;
+import org.mortbay.jetty.RequestLog;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.RequestLog;
+import org.mortbay.xml.XmlConfiguration;
+import org.mortbay.util.LazyList;
+import org.mortbay.jetty.security.UserRealm;
+import org.mortbay.jetty.Connector;

/**
* HTTP server implementation.
@@ -46,7 +47,9 @@
{
/**
* Get the Jetty XML configuration uri. The configuration uri is
- * used to establish the default server configuration.
+ * used to establish the default server configuration prior to
+ * customization via the server context. If not supplied the server
+ * will be deployed relative to the supplied context.
*
* @param uri the default uri
* @return a uri referencing a Jetty configuration profile
@@ -105,12 +108,11 @@
m_context = context;

getLogger().debug( "commencing http server deployment" );
- URI standard = new URI( "local:xml:dpml/planet/web/default" );
- URI uri = context.getConfiguration( standard );
Thread.currentThread().setContextClassLoader(
getClass().getClassLoader() );
+ URI uri = context.getConfiguration( null );
if( null != uri )
{
- getLogger().debug( "server configuration: " + uri );
+ getLogger().debug( "applying server configuration: " + uri );
URL url = uri.toURL();
XmlConfiguration config = new XmlConfiguration( url );
config.configure( this );
@@ -145,14 +147,41 @@
}

//
- // add realms and context handlers
+ // add connectors, realms and context handlers
//

+ addConnectors( parts );
addUserRealms( parts );
addContextHandlers( parts );
getLogger().debug( "server established" );
}

+ private void addConnectors( PartsManager parts ) throws Exception
+ {
+ getLogger().debug( "commencing connector addition" );
+ ComponentHandler[] handlers = parts.getComponentHandlers(
Connector.class );
+ ArrayList list = new ArrayList();
+ for( int i=0; i<handlers.length; i++ )
+ {
+ ComponentHandler handler = handlers[i];
+ getLogger().debug( "adding connector: " + handler );
+ try
+ {
+ Provider provider = handler.getProvider();
+ Connector ch = (Connector) provider.getValue( false );
+ list.add( ch );
+ }
+ catch( Throwable e )
+ {
+ final String error =
+ "Failed to deploy content handler: " + handler;
+ throw new Exception( error, e );
+ }
+ }
+ Connector[] connectors = (Connector[]) list.toArray( new
Connector[0] );
+ setConnectors( connectors );
+ }
+
private void addContextHandlers( PartsManager parts ) throws Exception
{
getLogger().debug( "commencing context handler addition" );
@@ -205,22 +234,22 @@
}

/*
- public void addHandler( Handler handler )
- throws Exception
- {
+ public void addHandler( Handler handler )
+ throws Exception
+ {
Handler[] handlers = getHandlers();
Handler[] newHandlers = (Handler[]) LazyList.addToArray( handlers,
handler );
Arrays.sort( newHandlers );
super.setHandlers( newHandlers );
- }
-
- public void setHandlers( Handler[] handlers )
- {
+ }
+
+ public void setHandlers( Handler[] handlers )
+ {
Arrays.sort( handlers );
super.setHandlers( handlers );
}
*/
-
+
private Logger getLogger()
{
return m_logger;

Modified:
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
===================================================================
---
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
2006-02-11 23:01:05 UTC (rev 1071)
+++
trunk/main/planet/web/server/src/main/net/dpml/web/server/SslSocketConnector.java
2006-02-12 01:26:34 UTC (rev 1072)
@@ -25,55 +25,174 @@
import org.mortbay.resource.Resource;

/**
- * SSL socket connector with enhanced keystore resolution semantics.
+ * SSL socket connector.
*/
public class SslSocketConnector extends
org.mortbay.jetty.security.SslSocketConnector
{
+ private static final int HEADER_BUFFER_SIZE = 4*1024;
+ private static final int REQUEST_BUFFER_SIZE = 8*1024;
+ private static final int RESPONSE_BUFFER_SIZE = 32*1024;
+ private static final int MAXIMUM_IDLE_TIME = 30000;
+ private static final int ACCEPT_QUEUE_SIZE = 0;
+ private static final int ACCEPTORS = 1;
+ private static final int SO_LINGER_TIME = 1000;
+ private static final int CONFIDENTIAL_PORT = 0;
+ private static final int INTEGRAL_PORT = 0;
+ private static final boolean ASSUME_SHORT_DISPATCH = false;
+
/**
- * Set the location of the keystore. The implementation supports
- * resolution of files using the Transit local resource protocol
- * together with system property symbolic resolution. Following argument
- * evalution the implementation delegates subsequent actions to the
- * Jetty implementation class.
- *
- * @param keystore the keystore value
+ * SSL connector context definition.
*/
- /*
- public void setKeystore( String keystore )
- {
- String resolved = PropertyResolver.resolve( keystore );
- Log.info( "# resolved keystore argument: [" + resolved + "]" );
- if( resolved.startsWith( "local:" ) )
+ public interface Context extends ConnectorContext
+ {
+ //setCipherSuites( String[] suites );
+
+ /**
+ * Return the certificate password.
+ * @param password implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getPassword( String password );
+
+ /**
+ * Return the keystore password.
+ * @param password implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getKeyPassword( String password );
+
+ /**
+ * Return the keystore algorithm.
+ * @param algorithm implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getAlgorithm( String algorithm );
+
+ /**
+ * Return the keystore protocol.
+ * @param protocol implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getProtocol( String protocol );
+
+ /**
+ * Return the keystore location uri.
+ * @param keystore implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ URI getKeystore( URI keystore );
+
+ /**
+ * Return the keystore type.
+ * @param type implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ String getKeystoreType( String type );
+
+ /**
+ * Return the 'want-client-authentication' policy.
+ * @param flag implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ boolean getWantClientAuth( boolean flag );
+
+ /**
+ * Return the 'need-client-authentication' policy.
+ * @param flag implementation defined default value
+ * @return the supplied value unless overriden in the deployment
configuration
+ */
+ boolean getNeedClientAuth( boolean flag );
+ }
+
+ public SslSocketConnector( Context context ) throws Exception
+ {
+ super();
+
+ String host = context.getHost( null );
+ if( null != host )
{
- Log.info( "# argument is a local value" );
- try
- {
- URI uri = new URI( resolved );
- File file = (File) uri.toURL().getContent( new Class[]{
File.class } );
- if( !file.exists() )
- {
- final String error =
- "Keystore file ["
- + file
- + "] does not exist.";
- throw new IllegalArgumentException( error );
- }
- String path = file.getCanonicalPath();
- Log.info( "# keystore\npath: " + path );
- super.setKeystore( path );
- }
- catch( Exception e )
- {
- final String error =
- "Invalid local keystore specification: " + resolved;
- throw new RuntimeException( error, e );
- }
+ setHost( host );
}
- else
+
+ int port = context.getPort();
+ setPort( port );
+
+ int headerBufferSize = context.getHeaderBufferSize(
HEADER_BUFFER_SIZE );
+ setHeaderBufferSize( headerBufferSize );
+
+ int requestBufferSize = context.getRequestBufferSize(
REQUEST_BUFFER_SIZE );
+ setRequestBufferSize( requestBufferSize );
+
+ int responseBufferSize = context.getResponseBufferSize(
RESPONSE_BUFFER_SIZE );
+ setResponseBufferSize( responseBufferSize );
+
+ int maxIdle = context.getMaxIdleTime( MAXIMUM_IDLE_TIME );
+ setMaxIdleTime( maxIdle );
+
+ int queueSize = context.getAcceptQueueSize( ACCEPT_QUEUE_SIZE );
+ setAcceptQueueSize( queueSize );
+
+ int acceptCount = context.getAcceptors( ACCEPTORS );
+ setAcceptors( acceptCount );
+
+ int linger = context.getSoLingerTime( SO_LINGER_TIME );
+ setSoLingerTime( linger );
+
+ int confidentialPort = context.getConfidentialPort(
CONFIDENTIAL_PORT );
+ setConfidentialPort( confidentialPort );
+
+ Scheme confidentialScheme = Scheme.parse(
context.getConfidentialScheme( "https" ) );
+ setConfidentialScheme( confidentialScheme.getName() );
+
+ int integralPort = context.getIntegralPort( INTEGRAL_PORT );
+ setIntegralPort( integralPort );
+
+ Scheme integralScheme = Scheme.parse( context.getIntegralScheme(
"https" ) );
+ setIntegralScheme( integralScheme.getName() );
+
+ // SslSocketConnector$Context
+
+ String password = context.getPassword( null );
+ if( null != password )
{
- Log.info( "# keystore location: " + resolved );
- super.setKeystore( resolved );
- }
+ setPassword( password );
+ }
+
+ String keyPassword = context.getKeyPassword( null );
+ if( null != keyPassword )
+ {
+ setKeyPassword( keyPassword );
+ }
+
+ String algorithm = context.getAlgorithm( null );
+ if( null != algorithm )
+ {
+ setAlgorithm( algorithm );
+ }
+
+ String protocol = context.getProtocol( null );
+ if( null != protocol )
+ {
+ setProtocol( protocol );
+ }
+
+ URI keystore = context.getKeystore( null );
+ if( null != keystore )
+ {
+ String keystorePath = keystore.toASCIIString();
+ setKeystore( keystorePath );
+ }
+
+ String keystoreType = context.getKeystoreType( null );
+ if( null != keystoreType )
+ {
+ setKeystoreType( keystoreType );
+ }
+
+ boolean wantClientAuth = context.getWantClientAuth( false );
+ setWantClientAuth( wantClientAuth );
+
+ boolean needClientAuth = context.getNeedClientAuth( false );
+ setNeedClientAuth( needClientAuth );
}
- */
}




  • r1072 - in trunk/main/planet/web/server: . etc/prefs src/main/net/dpml/web/server, mcconnell at BerliOS, 02/11/2006

Archive powered by MHonArc 2.6.24.

Top of Page