-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
75 additions
and
17 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
core/api/src/main/java/cloud/piranha/core/api/PiranhaBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2002-2024 Manorrock.com. All Rights Reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
package cloud.piranha.core.api; | ||
|
||
/** | ||
* The PiranhaBuilder API. | ||
* | ||
* @author Manfred Riem ([email protected]) | ||
* @param <T> the concrete Piranha type. | ||
*/ | ||
public interface PiranhaBuilder<T> { | ||
|
||
/** | ||
* Build the Piranha instance. | ||
* | ||
* @return the Piranha instance. | ||
*/ | ||
public T build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.coreprofile; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import cloud.piranha.core.api.PiranhaConfiguration; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import java.io.File; | ||
|
@@ -39,7 +40,7 @@ | |
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
public class CoreProfilePiranhaBuilder { | ||
public class CoreProfilePiranhaBuilder implements PiranhaBuilder<CoreProfilePiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.microprofile; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import cloud.piranha.core.api.PiranhaConfiguration; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import java.io.File; | ||
|
@@ -39,7 +40,7 @@ | |
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
public class MicroProfilePiranhaBuilder { | ||
public class MicroProfilePiranhaBuilder implements PiranhaBuilder<MicroProfilePiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.platform; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import java.io.File; | ||
import java.lang.System.Logger.Level; | ||
|
||
|
@@ -41,7 +42,7 @@ | |
* @author Manfred Riem ([email protected]) | ||
* @see cloud.piranha.dist.platform.PlatformPiranha | ||
*/ | ||
public class PlatformPiranhaBuilder { | ||
public class PlatformPiranhaBuilder implements PiranhaBuilder<PlatformPiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.server; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import java.lang.System.Logger.Level; | ||
|
||
import static javax.naming.Context.INITIAL_CONTEXT_FACTORY; | ||
|
@@ -41,7 +42,7 @@ | |
* @author Manfred Riem ([email protected]) | ||
* @see cloud.piranha.dist.server.ServerPiranha | ||
*/ | ||
public class ServerPiranhaBuilder { | ||
public class ServerPiranhaBuilder implements PiranhaBuilder<ServerPiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.servlet; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import cloud.piranha.core.api.PiranhaConfiguration; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import java.io.File; | ||
|
@@ -40,7 +41,7 @@ | |
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
public class ServletPiranhaBuilder { | ||
public class ServletPiranhaBuilder implements PiranhaBuilder<ServletPiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
*/ | ||
package cloud.piranha.dist.webprofile; | ||
|
||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import cloud.piranha.core.api.PiranhaConfiguration; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import java.io.File; | ||
|
@@ -39,7 +40,7 @@ | |
* | ||
* @author Manfred Riem ([email protected]) | ||
*/ | ||
public class WebProfilePiranhaBuilder { | ||
public class WebProfilePiranhaBuilder implements PiranhaBuilder<WebProfilePiranha> { | ||
|
||
/** | ||
* Stores the logger. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
package cloud.piranha.embedded; | ||
|
||
import cloud.piranha.core.api.HttpSessionManager; | ||
import cloud.piranha.core.api.PiranhaBuilder; | ||
import cloud.piranha.core.api.WebApplication; | ||
import cloud.piranha.core.api.WebApplicationExtension; | ||
import cloud.piranha.core.impl.DefaultWebApplicationExtensionContext; | ||
|
@@ -52,7 +53,7 @@ | |
* @author Manfred Riem ([email protected]) | ||
* @see cloud.piranha.embedded.EmbeddedPiranha | ||
*/ | ||
public class EmbeddedPiranhaBuilder { | ||
public class EmbeddedPiranhaBuilder implements PiranhaBuilder<EmbeddedPiranha> { | ||
|
||
/** | ||
* Stores the async supported flags. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters