mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1170: Move modules back to separate packages.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
@@ -30,6 +30,9 @@ import javax.servlet.ServletContextEvent;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.environment.Environment;
|
||||
import org.glyptodon.guacamole.environment.LocalEnvironment;
|
||||
import org.glyptodon.guacamole.net.basic.log.LogModule;
|
||||
import org.glyptodon.guacamole.net.basic.rest.RESTAuthModule;
|
||||
import org.glyptodon.guacamole.net.basic.rest.RESTServletModule;
|
||||
import org.glyptodon.guacamole.net.basic.rest.auth.BasicTokenSessionMap;
|
||||
import org.glyptodon.guacamole.net.basic.rest.auth.TokenSessionMap;
|
||||
import org.slf4j.Logger;
|
||||
@@ -77,12 +80,11 @@ public class BasicServletContextListener extends GuiceServletContextListener {
|
||||
|
||||
@Override
|
||||
protected Injector getInjector() {
|
||||
return Guice.createInjector(
|
||||
Stage.PRODUCTION,
|
||||
return Guice.createInjector(Stage.PRODUCTION,
|
||||
new EnvironmentModule(environment),
|
||||
new LogModule(environment),
|
||||
new AuthenticationModule(environment, sessionMap),
|
||||
new RESTModule(),
|
||||
new RESTAuthModule(environment, sessionMap),
|
||||
new RESTServletModule(),
|
||||
new TunnelModule()
|
||||
);
|
||||
}
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import org.glyptodon.guacamole.environment.Environment;
|
@@ -20,15 +20,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic;
|
||||
|
||||
import com.google.inject.servlet.ServletModule;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.net.basic.BasicGuacamoleTunnelServlet;
|
||||
import org.glyptodon.guacamole.net.basic.GuacamoleClassLoader;
|
||||
import org.glyptodon.guacamole.net.basic.TunnelLoader;
|
||||
import org.glyptodon.guacamole.net.basic.TunnelRequestService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Glyptodon LLC
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dependency injection classes specific to the Guacamole web application.
|
||||
*/
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic.log;
|
||||
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.classic.joran.JoranConfigurator;
|
@@ -20,10 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic.rest;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Inject;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.environment.Environment;
|
||||
import org.glyptodon.guacamole.net.auth.AuthenticationProvider;
|
||||
@@ -41,12 +40,12 @@ import org.slf4j.LoggerFactory;
|
||||
* @author James Muehlner
|
||||
* @author Michael Jumper
|
||||
*/
|
||||
public class AuthenticationModule extends AbstractModule {
|
||||
public class RESTAuthModule extends AbstractModule {
|
||||
|
||||
/**
|
||||
* Logger for this class.
|
||||
*/
|
||||
private final Logger logger = LoggerFactory.getLogger(AuthenticationModule.class);
|
||||
private final Logger logger = LoggerFactory.getLogger(RESTAuthModule.class);
|
||||
|
||||
/**
|
||||
* The Guacamole server environment.
|
||||
@@ -69,7 +68,7 @@ public class AuthenticationModule extends AbstractModule {
|
||||
* An instance of TokenSessionMap to inject as a singleton wherever
|
||||
* needed.
|
||||
*/
|
||||
public AuthenticationModule(Environment environment,
|
||||
public RESTAuthModule(Environment environment,
|
||||
TokenSessionMap tokenSessionMap) {
|
||||
this.environment = environment;
|
||||
this.tokenSessionMap = tokenSessionMap;
|
@@ -20,16 +20,13 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.glyptodon.guacamole.net.basic.inject;
|
||||
package org.glyptodon.guacamole.net.basic.rest;
|
||||
|
||||
import com.google.inject.Scopes;
|
||||
import com.google.inject.matcher.Matchers;
|
||||
import com.google.inject.servlet.ServletModule;
|
||||
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
|
||||
import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
|
||||
import org.glyptodon.guacamole.net.basic.rest.AuthProviderRESTExceptionWrapper;
|
||||
import org.glyptodon.guacamole.net.basic.rest.AuthProviderRESTExposure;
|
||||
import org.glyptodon.guacamole.net.basic.rest.ObjectRetrievalService;
|
||||
import org.glyptodon.guacamole.net.basic.rest.auth.TokenRESTService;
|
||||
import org.glyptodon.guacamole.net.basic.rest.clipboard.ClipboardRESTService;
|
||||
import org.glyptodon.guacamole.net.basic.rest.connection.ConnectionRESTService;
|
||||
@@ -44,7 +41,7 @@ import org.glyptodon.guacamole.net.basic.rest.user.UserRESTService;
|
||||
*
|
||||
* @author James Muehlner
|
||||
*/
|
||||
public class RESTModule extends ServletModule {
|
||||
public class RESTServletModule extends ServletModule {
|
||||
|
||||
@Override
|
||||
protected void configureServlets() {
|
@@ -42,7 +42,7 @@
|
||||
</filter-mapping>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.glyptodon.guacamole.net.basic.inject.BasicServletContextListener</listener-class>
|
||||
<listener-class>org.glyptodon.guacamole.net.basic.BasicServletContextListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Audio file mimetype mappings -->
|
||||
|
Reference in New Issue
Block a user