Skip to content

Commit

Permalink
MODCLUSTER-611 Fix checstyle issues in container: RegexpSingleline, R…
Browse files Browse the repository at this point in the history
…edundantModifier
  • Loading branch information
rhusar committed Aug 15, 2017
1 parent 70ba473 commit 1c1b7bd
Show file tree
Hide file tree
Showing 23 changed files with 129 additions and 128 deletions.
Expand Up @@ -25,7 +25,7 @@

/**
* SPI for a connector, defined as a communication end-point for a client or proxy.
*
*
* @author Paul Ferraro
*/
public interface Connector {
Expand All @@ -43,7 +43,7 @@ enum Type {

/**
* Indicates the default port for this type of connector
*
*
* @return a valid port number
*/
public int getDefaultPort() {
Expand All @@ -62,36 +62,36 @@ public String toString() {
/**
* Indicates whether the endpoint of this connector uses a reverse connection to httpd. A reverse connection uses a normal
* socket connection, instead of the traditional server socket.
*
*
* @return true, if the endpoint uses a reverse connection, false otherwise
*/
boolean isReverse();

/**
* Indicates the type of this connector
*
*
* @return a connector type
*/
Type getType();

/**
* Returns the address on which this connector operates
*
*
* @return an address
*/
InetAddress getAddress();

/**
* Sets the address on which this connector operates. Used to set an explicit connector address if undefined or defined
* as any address.
*
*
* @param address a network interface address
*/
void setAddress(InetAddress address);

/**
* Returns the port on which this connector operates
*
*
* @return a port number
*/
int getPort();
Expand Down
Expand Up @@ -24,14 +24,14 @@
/**
* Defines the container events to which mod_cluster will respond. This API defines the integration point between mod_cluster
* and the servlet container.
*
*
* @author Paul Ferraro
*/
public interface ContainerEventHandler {
/**
* Triggers the initialization of mod_cluster. This event should be triggered only once, after the startup of the servlet
* container, but before triggering the {@link #start(Server)} event.
*
*
* @param server a server
*/
void init(Server server);
Expand All @@ -44,54 +44,54 @@ public interface ContainerEventHandler {
/**
* Indicates the deployment of a new web application. This event triggers a ENABLE-APP command for this context, if it is
* already started.
*
*
* @param context the added context
*/
void add(Context context);

/**
* Indicates the specified web application context was started. This event triggers an ENABLE-APP command for the specified
* context.
*
*
* @param context the started context
*/
void start(Context context);

/**
* Indicates the specified web application context was stopped. This event triggers a STOP-APP command for the context
* started by {@link #start(Context)}.
*
*
* @param context the stopped context
*/
void stop(Context context);

/**
* Indicates the undeployment of the specified context. This event triggers a REMOVE-APP command for the specified context.
*
*
* @param context the removed context
*/
void remove(Context context);

/**
* This is a periodic event that triggers a STATUS command containing newly calculated load factor. This event also
* processing of newly added/discovered proxies, and reset of any proxies in error.
*
*
* @param engine the engine to be processed
*/
void status(Engine engine);

/**
* Indicates the servlet container has been started. This event triggers the configuration of each servlet engine, and the
* addition of all web application contexts.
*
*
* @param server the started server
*/
void start(Server server);

/**
* Indicates the servlet container has been stopped. This event triggers the removal of all web application contexts, and
* REMOVE-APP * of each engine.
*
*
* @param server the stopped server
*/
void stop(Server server);
Expand Down
Expand Up @@ -26,7 +26,7 @@

/**
* SPI for a web application context.
*
*
* @author Paul Ferraro
*/
public interface Context {
Expand Down Expand Up @@ -59,28 +59,28 @@ public interface Context {

/**
* Adds the specified session listener to this context.
*
*
* @param listener a session listener
*/
void addSessionListener(HttpSessionListener listener);

/**
* Removes the specified session listener to this context.
*
*
* @param listener a session listener
*/
void removeSessionListener(HttpSessionListener listener);

/**
* Returns the number of active sessions for this context.
*
*
* @return the active session count
*/
int getActiveSessionCount();

/**
* Indicates whether this context is distributable.
*
*
* @return true, if this context distributes sessions, false otherwise
*/
boolean isDistributable();
Expand Down
Expand Up @@ -24,83 +24,84 @@
/**
* SPI for an engine, defined as collection of one or more hosts associated with a collection of Connectors. The only Connector
* of significance is the one used to communicate with a proxy.
*
*
* @author Paul Ferraro
*/
public interface Engine {
/**
* The name of this engine.
*
*
* @return the engine name
*/
String getName();

/**
* The server to which this engine is associated.
*
*
* @return a server.
*/
Server getServer();

/**
* The hosts associated with this engine.
*
*
* @return the engine's hosts.
*/
Iterable<Host> getHosts();

/**
* The connector to which this engine uses to communicate with its proxies.
*
*
* @return the connector used by mod_cluster
*/
Connector getProxyConnector();

/**
* The connector to which this engine uses to communicate with its proxies.
*
*
* @return the connector used by mod_cluster
*/
Iterable<Connector> getConnectors();

/**
* The jvm route of this servlet engine. This uniquely identifies this node within the proxy.
*
*
* @return the servlet engine's jvm route
*/
String getJvmRoute();

/**
* Set this jvm route for this servlet engine. Used to create a reasonable default value, if no explicit route is defined.
*
*
* @param jvmRoute a unique jvm route.
*/
void setJvmRoute(String jvmRoute);

/**
* Returns the host identified by the specified host name.
*
*
* @param name the host name
* @return a servlet engine host
*/
Host findHost(String name);

/**
* Returns the cookie name used for sessions.
*
*
* @return a cookie name
*/
String getSessionCookieName();

/**
* Returns the url parameter name used for sessions.
*
*
* @return a parameter name
*/
String getSessionParameterName();

/**
* Returns the default host of this engine.
*
* @return the default host
*/
String getDefaultHost();
Expand Down
Expand Up @@ -25,41 +25,41 @@

/**
* SPI for a host, defined as a set of web application contexts.
*
*
* @author Paul Ferraro
*/
public interface Host {
/**
* The name of this host.
*
*
* @return the host name
*/
String getName();

/**
* The engine to which this host is associated.
*
*
* @return the servlet engine
*/
Engine getEngine();

/**
* Returns the contexts associated with this host.
*
*
* @return this host's contexts
*/
Iterable<Context> getContexts();

/**
* Returns the aliases of this host, including the actual host name
*
*
* @return a set of aliases
*/
Set<String> getAliases();

/**
* Returns the context identified by the specified context path.
*
*
* @param path a context path
* @return a web application context
*/
Expand Down
Expand Up @@ -24,13 +24,13 @@

/**
* SPI for a web application server, defined as a collection of one or more Engines.
*
*
* @author Paul Ferraro
*/
public interface Server {
/**
* Returns the servlet engines associated with this server.
*
*
* @return the server's engines
*/
Iterable<Engine> getEngines();
Expand Down
Expand Up @@ -36,7 +36,7 @@ public class JMXServerProvider implements ServerProvider {
private final ObjectName name;
private final MBeanServer mbeanServer;
private volatile Server server;

public JMXServerProvider(MBeanServer mbeanServer, ObjectName name) {
this.mbeanServer = mbeanServer;
this.name = name;
Expand All @@ -47,10 +47,10 @@ public Server getServer() {
if (this.server != null) return this.server;

this.server = this.findServer();

return this.server;
}

private Server findServer() {
try {
Service[] services = (Service[]) this.mbeanServer.invoke(this.name, "findServices", null, null);
Expand Down
Expand Up @@ -332,7 +332,7 @@ public String getProxyConfigurationString() {
Map<InetSocketAddress, String> map = this.service.getProxyConfiguration();
if (map.isEmpty())
return null;
Object results[] = map.values().toArray();
Object[] results = map.values().toArray();
result = (String) results[0];
return result;
}
Expand All @@ -343,7 +343,7 @@ public String getProxyInfoString() {
Map<InetSocketAddress, String> map = this.service.getProxyInfo();
if (map.isEmpty())
return null;
Object results[] = map.values().toArray();
Object[] results = map.values().toArray();
result = (String) results[0];
return result;
}
Expand Down

0 comments on commit 1c1b7bd

Please sign in to comment.