Skip to content

Move Legacy Dispatching #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions gemini-legacy-dispatching/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<organization>
<name>TechEmpower, Inc.</name>
<url>https://www.techempower.com/</url>
</organization>

<licenses>
<license>
<name>Revised BSD License, 3-clause</name>
<distribution>repo</distribution>
</license>
</licenses>

<parent>
<artifactId>gemini-parent</artifactId>
<groupId>com.techempower</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>

<groupId>com.techempower</groupId>
<artifactId>gemini-legacy-dispatching</artifactId>
<description>
An extension for Gemini that provides the old request dispatching functionality.
</description>

<dependencies>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini</artifactId>
</dependency>
</dependencies>


</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
<artifactId>gemini-logback</artifactId>
<version>${geminiVersion}</version>
</dependency>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini-legacy-dispatching</artifactId>
<version>${geminiVersion}</version>
</dependency>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini-resin-legacy-dispatching</artifactId>
<version>${geminiVersion}</version>
</dependency>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini-jdbc</artifactId>
Expand Down
63 changes: 63 additions & 0 deletions gemini-resin-legacy-dispatching/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>

<organization>
<name>TechEmpower, Inc.</name>
<url>https://www.techempower.com/</url>
</organization>

<licenses>
<license>
<name>Revised BSD License, 3-clause</name>
<distribution>repo</distribution>
</license>
</licenses>

<parent>
<artifactId>gemini-parent</artifactId>
<groupId>com.techempower</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>

<groupId>com.techempower</groupId>
<artifactId>gemini-resin-legacy-dispatching</artifactId>
<description>
An extension for Gemini that provides the old request dispatching functionality for Resin.
</description>

<dependencies>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini</artifactId>
</dependency>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini-resin</artifactId>
</dependency>
<dependency>
<groupId>com.techempower</groupId>
<artifactId>gemini-legacy-dispatching</artifactId>
</dependency>
<dependency>
<groupId>com.caucho</groupId>
<artifactId>resin</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
</dependency>
</dependencies>

</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ public abstract class ResinGeminiApplication
* return toReturn;
* </pre>
*/
// TODO: It'd be nice if this was refactored so that you create the
// dispatcher during the initialize method, rather than in the constructor.
@Override
protected Dispatcher constructDispatcher()
{
return new BasicDispatcher(this);
}
protected abstract Dispatcher constructDispatcher();

/**
* Overload: Constructs an HttpSessionManager reference. Overload to return a
* custom object. It is not likely that a application would need to subclass
* HttpSessionManager.
*/
// TODO?: Need to refactor this so that it's just part of the (legacy?) dispatcher?
@Override
protected SessionManager constructSessionManager()
{
Expand All @@ -127,12 +127,14 @@ protected GeminiMonitor constructMonitor()
* LONGER necessary to overload this method if your application is not using
* a special subclass of Context.
*/
// TODO: Need to refactor this so that it's just part of the (legacy?) dispatcher.
@Override
public Context getContext(Request request)
{
return new ResinContext(request, this);
}

// TODO: Need to refactor this so that it's just part of the legacy dispatcher.
@Override
protected MustacheManager constructMustacheManager()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/**
* An interface allowing classes to monitor Dispatcher activity.
*/
// TODO?: Move this to gemini-legacy-dispatching. Might be hard, transitively
// is depended on by gemini-jdbc's JdbcMonitorListener among many other things
// in gemini, gemini-resin, etc.
public interface DispatchListener
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
* <p>
* It is common for applications to inherit from an intermediate subclass of
* BasicManager such as BasicPathManager.
*
*
* TODO?: BasicPathManager is no longer in this Maven module. Will this be a
* problem for javadoc compilation?
*
* @see com.techempower.gemini.path.BasicPathManager
*/
public class BasicManager<A extends GeminiApplication>
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
<module>gemini-log4j2</module>
<module>gemini-logback</module>
<module>gemini-log4j12</module>
<module>gemini-legacy-dispatching</module>
<module>gemini-resin-legacy-dispatching</module>
</modules>

<properties>
Expand Down Expand Up @@ -137,6 +139,16 @@
<artifactId>gemini-hikaricp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gemini-legacy-dispatching</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>gemini-resin-legacy-dispatching</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down