Hi,
I'll improve documentation.
This loading war file from remote location can be used for distribution in
clustered/ha environment.
Just a thought.
Cheers,
Hubert
On Mon, Sep 21, 2009 at 8:36 PM, Jeanfrancois Arcand <
Jeanfrancois.Arcand_at_sun.com> wrote:
>
>
> Hubert Iwaniuk wrote:
>
>> Thanks for you reply.
>> See comments inline.
>>
>> On Mon, Sep 21, 2009 at 5:31 PM, Jeanfrancois Arcand <
>> Jeanfrancois.Arcand_at_sun.com <mailto:Jeanfrancois.Arcand_at_sun.com>> wrote:
>>
>> Salut,
>>
>> Index:
>>
>> modules/http/src/main/java/com/sun/grizzly/http/deployer/FromURIDeployer.java
>> +public abstract class FromURIDeployer<V> extends Deployer<V> {
>> +
>> + /**
>> + * Deploy deployable to gws.
>> + *
>> + * @param gws Grizzly to deploy to.
>> + * @param deployFrom URI ofr deployable to be deployed.
>> + *
>> + * @return Deployment identification.
>> + *
>> + * @throws DeployException Error in deployment.
>> + */
>> + public final Integer deploy(GrizzlyWebServer gws, URI
>> deployFrom) throws DeployException {
>> + return super.deploy(gws, fromURI(deployFrom));
>> + }
>> +
>> + /**
>> + * Create object to deploy from uri.
>> + *
>> + * @param uri of deployable object.
>> + *
>> + * @return Deployable object.
>> + */
>> + public abstract V fromURI(URI uri);
>>
>>
>> Do we needs that method to be abstract? I would think all URI should
>> be deployed the same way. Can you elaborate?
>>
>> URI is just location of we have no idea what. It might be WAR file
>> location it might be some other Deployable type.
>> What do you mean by all URI should be deployed the same way?
>>
>>
>
> OK then I agree, but we need to improve the documentation explaining what
> it does exactly, e.g will resolve the URI and deploy a war, directory or a
> remote was file. This is great!
>
>
>
>
>
>>
>>
>> +}
>> Index:
>>
>> modules/http/src/main/java/com/sun/grizzly/http/deployer/Deployer.java
>> ===================================================================
>> ---
>>
>> modules/http/src/main/java/com/sun/grizzly/http/deployer/Deployer.java
>> Fri Sep 18 16:52:22 CEST 2009
>> +++
>>
>> modules/http/src/main/java/com/sun/grizzly/http/deployer/Deployer.java
>> Fri Sep 18 16:52:22 CEST 2009
>> @@ -0,0 +1,93 @@
>> +/*
>> + * The contents of this file are subject to the terms
>> + * of the Common Development and Distribution License
>> + * (the License). You may not use this file except in
>> + * compliance with the License.
>> + *
>> + * You can obtain a copy of the license at
>> + * https://glassfish.dev.java.net/public/CDDLv1.0.html or
>> + * glassfish/bootstrap/legal/CDDLv1.0.txt.
>> + * See the License for the specific language governing
>> + * permissions and limitations under the License.
>> + *
>> + * When distributing Covered Code, include this CDDL
>> + * Header Notice in each file and include the License file
>> + * at glassfish/bootstrap/legal/CDDLv1.0.txt.
>> + * If applicable, add the following below the CDDL Header,
>> + * with the fields enclosed by brackets [] replaced by
>> + * you own identifying information:
>> + * "Portions Copyrighted [year] [name of copyright owner]"
>> + *
>> + * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
>> + */
>> +package com.sun.grizzly.http.deployer;
>> +
>> +import com.sun.grizzly.http.embed.GrizzlyWebServer;
>> +import com.sun.grizzly.tcp.http11.GrizzlyAdapter;
>> +
>> +import java.util.Map;
>> +import java.util.Set;
>> +import java.util.HashMap;
>> +
>> +/**
>> + * Deployer abstraction.
>> + *
>> + * @author Hubert Iwaniuk
>> + * @param <V> Type of object deployed by this deployer.
>> + * @since Sep 17, 2009
>> + */
>> +public abstract class Deployer<V> {
>> +
>> + private Map<Integer, Set<GrizzlyAdapter>> deployed
>> + = new HashMap<Integer, Set<GrizzlyAdapter>>();
>> +
>> + /**
>> + * Deploy deployable to gws.
>> + *
>> + * @param gws Grizzly to deploy to.
>> + * @param toDeploy Deployable to be deployed.
>> + *
>> + * @return Deployment identification.
>> + *
>> + * @throws DeployException Error in deployment.
>> + */
>> + public final Integer deploy(GrizzlyWebServer gws, V
>> toDeploy) throws DeployException {
>> + Map<GrizzlyAdapter, Set<String>> map = convert(toDeploy);
>>
>>
>> Here the convert role will consist of doing something similar to
>> what the current GWSD does right now, e.g. populate
>> GrizzlyAdapter/ServletAdapter instances, right?
>>
>> Exactly. This convert method is abstract and produces mapping of GA to
>> strings to map it to.
>>
>
> Thanks!
>
> -- Jeanfrancois
>
>
>
>> A+
>>
>> --Jeanfrancois
>>
>>
>> Thanks,
>> Hubert.
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>
>