Remove unnecessary interface modifiers.

This commit is contained in:
Craig P. Motlin 2011-11-06 11:54:21 -05:00
parent 47a3783d6c
commit c27af721b0
21 changed files with 88 additions and 88 deletions

View File

@ -47,7 +47,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code NUL (0x00)} byte.
*/
static ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == 0;
@ -57,7 +57,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code NUL (0x00)} byte.
*/
static ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != 0;
@ -67,7 +67,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code CR ('\r')} byte.
*/
static ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == '\r';
@ -77,7 +77,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code CR ('\r')} byte.
*/
static ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != '\r';
@ -87,7 +87,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code LF ('\n')} byte.
*/
static ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == '\n';
@ -97,7 +97,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code LF ('\n')} byte.
*/
static ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != '\n';
@ -107,7 +107,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code CR ('\r')} or {@code LF ('\n')}.
*/
static ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -119,7 +119,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a byte which is neither a {@code CR ('\r')}
* nor a {@code LF ('\n')}.
*/
static ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -131,7 +131,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a linear whitespace
* ({@code ' '} and {@code '\t'}).
*/
static ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -143,7 +143,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a byte which is not a linear whitespace
* (neither {@code ' '} nor {@code '\t'}).
*/
static ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);

View File

@ -117,25 +117,25 @@ public interface Channel extends Comparable<Channel> {
* The {@link #getInterestOps() interestOps} value which tells that only
* read operation has been suspended.
*/
static int OP_NONE = 0;
int OP_NONE = 0;
/**
* The {@link #getInterestOps() interestOps} value which tells that neither
* read nor write operation has been suspended.
*/
static int OP_READ = 1;
int OP_READ = 1;
/**
* The {@link #getInterestOps() interestOps} value which tells that both
* read and write operation has been suspended.
*/
static int OP_WRITE = 4;
int OP_WRITE = 4;
/**
* The {@link #getInterestOps() interestOps} value which tells that only
* write operation has been suspended.
*/
static int OP_READ_WRITE = OP_READ | OP_WRITE;
int OP_READ_WRITE = OP_READ | OP_WRITE;
/**
* Returns the unique integer ID of this channel.

View File

@ -41,7 +41,7 @@ public interface ChannelFutureListener extends EventListener {
* A {@link ChannelFutureListener} that closes the {@link Channel} which is
* associated with the specified {@link ChannelFuture}.
*/
static ChannelFutureListener CLOSE = new ChannelFutureListener() {
ChannelFutureListener CLOSE = new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) {
future.getChannel().close();
@ -52,7 +52,7 @@ public interface ChannelFutureListener extends EventListener {
* A {@link ChannelFutureListener} that closes the {@link Channel} when the
* operation ended up with a failure or cancellation rather than a success.
*/
static ChannelFutureListener CLOSE_ON_FAILURE = new ChannelFutureListener() {
ChannelFutureListener CLOSE_ON_FAILURE = new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) {
if (!future.isSuccess()) {

View File

@ -233,7 +233,7 @@ public interface ChannelHandler {
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Sharable {
@interface Sharable {
// no value
}
}

View File

@ -27,8 +27,8 @@ import java.net.InetSocketAddress;
* @author OneDrum Ltd.
*/
interface HttpTunnelAcceptedChannelFactory {
public HttpTunnelAcceptedChannelReceiver newChannel(String newTunnelId,
InetSocketAddress remoteAddress);
HttpTunnelAcceptedChannelReceiver newChannel(String newTunnelId,
InetSocketAddress remoteAddress);
public String generateTunnelId();
String generateTunnelId();
}

View File

@ -27,10 +27,10 @@ import org.jboss.netty.buffer.ChannelBuffer;
*/
interface HttpTunnelAcceptedChannelReceiver {
public void updateInterestOps(SaturationStateChange transition);
void updateInterestOps(SaturationStateChange transition);
public void dataReceived(ChannelBuffer data);
void dataReceived(ChannelBuffer data);
public void clientClosed();
void clientClosed();
}

View File

@ -35,8 +35,8 @@ interface HttpTunnelClientWorkerOwner {
* The HTTP tunnel client sink invokes this when the application code requests the connection
* of an HTTP tunnel to the specified remote address.
*/
public void onConnectRequest(ChannelFuture connectFuture,
InetSocketAddress remoteAddress);
void onConnectRequest(ChannelFuture connectFuture,
InetSocketAddress remoteAddress);
/**
* The send channel handler calls this method when the server accepts the open tunnel request,
@ -44,25 +44,25 @@ interface HttpTunnelClientWorkerOwner {
*
* @param tunnelId the server allocated tunnel ID
*/
public void onTunnelOpened(String tunnelId);
void onTunnelOpened(String tunnelId);
/**
* The poll channel handler calls this method when the poll channel is connected, indicating
* that full duplex communications are now possible.
*/
public void fullyEstablished();
void fullyEstablished();
/**
* The poll handler calls this method when some data is received and decoded from the server.
* @param content the data received from the server
*/
public void onMessageReceived(ChannelBuffer content);
void onMessageReceived(ChannelBuffer content);
/**
* @return the name of the server with whom we are communicating with - this is used within
* the HOST HTTP header for all requests. This is particularly important for operation behind
* a proxy, where the HOST string is used to route the request.
*/
public String getServerHostName();
String getServerHostName();
}

View File

@ -28,9 +28,9 @@ import org.jboss.netty.channel.ChannelFuture;
*/
interface ServerMessageSwitchDownstreamInterface {
public void serverCloseTunnel(String tunnelId);
void serverCloseTunnel(String tunnelId);
public void routeOutboundData(String tunnelId, ChannelBuffer data,
ChannelFuture writeFuture);
void routeOutboundData(String tunnelId, ChannelBuffer data,
ChannelFuture writeFuture);
}

View File

@ -32,11 +32,11 @@ import org.jboss.netty.channel.Channel;
*/
interface ServerMessageSwitchUpstreamInterface {
public String createTunnel(InetSocketAddress remoteAddress);
String createTunnel(InetSocketAddress remoteAddress);
public boolean isOpenTunnel(String tunnelId);
boolean isOpenTunnel(String tunnelId);
public void clientCloseTunnel(String tunnelId);
void clientCloseTunnel(String tunnelId);
/**
* Passes some received data from a client for forwarding to the server's view
@ -45,12 +45,12 @@ interface ServerMessageSwitchUpstreamInterface {
* functional, CLOSED indicates it is closed and the client should be notified
* of this (and will be forgotten after this notification).
*/
public TunnelStatus routeInboundData(String tunnelId,
ChannelBuffer inboundData);
TunnelStatus routeInboundData(String tunnelId,
ChannelBuffer inboundData);
public void pollOutboundData(String tunnelId, Channel responseChannel);
void pollOutboundData(String tunnelId, Channel responseChannel);
public static enum TunnelStatus {
enum TunnelStatus {
ALIVE, CLOSED
}

View File

@ -32,6 +32,6 @@ public interface TunnelIdGenerator {
* an existing tunnel ID). This method must be thread safe, and
* preferably lock free.
*/
public String generateId();
String generateId();
}

View File

@ -41,7 +41,7 @@ public interface WebSocketCallback {
* @param client
* Current client used to connect
*/
public void onConnect(WebSocketClient client);
void onConnect(WebSocketClient client);
/**
* Called when the client got disconnected from the server.
@ -49,7 +49,7 @@ public interface WebSocketCallback {
* @param client
* Current client that was disconnected
*/
public void onDisconnect(WebSocketClient client);
void onDisconnect(WebSocketClient client);
/**
* Called when a message arrives from the server.
@ -59,7 +59,7 @@ public interface WebSocketCallback {
* @param frame
* Data received from server
*/
public void onMessage(WebSocketClient client, WebSocketFrame frame);
void onMessage(WebSocketClient client, WebSocketFrame frame);
/**
* Called when an unhandled errors occurs.
@ -67,5 +67,5 @@ public interface WebSocketCallback {
* @param t
* The causing error
*/
public void onError(Throwable t);
void onError(Throwable t);
}

View File

@ -37,14 +37,14 @@ public interface WebSocketClient {
*
* @return Connect future. Fires when connected.
*/
public ChannelFuture connect();
ChannelFuture connect();
/**
* Disconnect from the server
*
* @return Disconnect future. Fires when disconnected.
*/
public ChannelFuture disconnect();
ChannelFuture disconnect();
/**
* Send data to server
@ -53,5 +53,5 @@ public interface WebSocketClient {
* Data for sending
* @return Write future. Will fire when the data is sent.
*/
public ChannelFuture send(WebSocketFrame frame);
ChannelFuture send(WebSocketFrame frame);
}

View File

@ -32,35 +32,35 @@ public interface FileUpload extends HttpData {
* as provided by the browser (or other client software).
* @return the original filename
*/
public String getFilename();
String getFilename();
/**
* Set the original filename
* @param filename
*/
public void setFilename(String filename);
void setFilename(String filename);
/**
* Set the Content Type passed by the browser if defined
* @param contentType Content Type to set - must be not null
*/
public void setContentType(String contentType);
void setContentType(String contentType);
/**
* Returns the content type passed by the browser or null if not defined.
* @return the content type passed by the browser or null if not defined.
*/
public String getContentType();
String getContentType();
/**
* Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
* @param contentTransferEncoding
*/
public void setContentTransferEncoding(String contentTransferEncoding);
void setContentTransferEncoding(String contentTransferEncoding);
/**
* Returns the Content-Transfer-Encoding
* @return the Content-Transfer-Encoding
*/
public String getContentTransferEncoding();
String getContentTransferEncoding();
}

View File

@ -43,7 +43,7 @@ public interface HttpChunk {
/**
* The 'end of content' marker in chunked encoding.
*/
static HttpChunkTrailer LAST_CHUNK = new HttpChunkTrailer() {
HttpChunkTrailer LAST_CHUNK = new HttpChunkTrailer() {
@Override
public ChannelBuffer getContent() {
return ChannelBuffers.EMPTY_BUFFER;

View File

@ -36,7 +36,7 @@ public interface HttpData extends InterfaceHttpData {
* @param buffer must be not null
* @exception IOException
*/
public void setContent(ChannelBuffer buffer) throws IOException;
void setContent(ChannelBuffer buffer) throws IOException;
/**
* Add the content from the ChannelBuffer
@ -44,7 +44,7 @@ public interface HttpData extends InterfaceHttpData {
* @param last True of the buffer is the last one
* @exception IOException
*/
public void addContent(ChannelBuffer buffer, boolean last)
void addContent(ChannelBuffer buffer, boolean last)
throws IOException;
/**
@ -52,46 +52,46 @@ public interface HttpData extends InterfaceHttpData {
* @param file must be not null
* @exception IOException
*/
public void setContent(File file) throws IOException;
void setContent(File file) throws IOException;
/**
* Set the content from the inputStream (erase any previous data)
* @param inputStream must be not null
* @exception IOException
*/
public void setContent(InputStream inputStream) throws IOException;
void setContent(InputStream inputStream) throws IOException;
/**
*
* @return True if the InterfaceHttpData is completed (all data are stored)
*/
public boolean isCompleted();
boolean isCompleted();
/**
* Returns the size in byte of the InterfaceHttpData
* @return the size of the InterfaceHttpData
*/
public long length();
long length();
/**
* Deletes the underlying storage for a file item,
* including deleting any associated temporary disk file.
*/
public void delete();
void delete();
/**
* Returns the contents of the file item as an array of bytes.
* @return the contents of the file item as an array of bytes.
* @exception IOException
*/
public byte[] get() throws IOException;
byte[] get() throws IOException;
/**
* Returns the content of the file item as a ChannelBuffer
* @return the content of the file item as a ChannelBuffer
* @throws IOException
*/
public ChannelBuffer getChannelBuffer() throws IOException;
ChannelBuffer getChannelBuffer() throws IOException;
/**
* Returns a ChannelBuffer for the content from the current position with at most length read
@ -102,14 +102,14 @@ public interface HttpData extends InterfaceHttpData {
* an EMPTY_BUFFER if there is no more data to return
* @throws IOException
*/
public ChannelBuffer getChunk(int length) throws IOException;
ChannelBuffer getChunk(int length) throws IOException;
/**
* Returns the contents of the file item as a String, using the default character encoding.
* @return the contents of the file item as a String, using the default character encoding.
* @exception IOException
*/
public String getString() throws IOException;
String getString() throws IOException;
/**
* Returns the contents of the file item as a String, using the specified charset.
@ -117,19 +117,19 @@ public interface HttpData extends InterfaceHttpData {
* @return the contents of the file item as a String, using the specified charset.
* @exception IOException
*/
public String getString(Charset encoding) throws IOException;
String getString(Charset encoding) throws IOException;
/**
* Set the Charset passed by the browser if defined
* @param charset Charset to set - must be not null
*/
public void setCharset(Charset charset);
void setCharset(Charset charset);
/**
* Returns the Charset passed by the browser or null if not defined.
* @return the Charset passed by the browser or null if not defined.
*/
public Charset getCharset();
Charset getCharset();
/**
* A convenience method to write an uploaded item to disk.
@ -140,19 +140,19 @@ public interface HttpData extends InterfaceHttpData {
* @return True if the write is successful
* @exception IOException
*/
public boolean renameTo(File dest) throws IOException;
boolean renameTo(File dest) throws IOException;
/**
* Provides a hint as to whether or not the file contents will be read from memory.
* @return True if the file contents is in memory.
*/
public boolean isInMemory();
boolean isInMemory();
/**
*
* @return the associated File if this data is represented in a file
* @exception IOException if this data is not represented by a file
*/
public File getFile() throws IOException;
File getFile() throws IOException;
}

View File

@ -35,7 +35,7 @@ public interface HttpDataFactory {
* @throws NullPointerException
* @throws IllegalArgumentException
*/
public Attribute createAttribute(HttpRequest request, String name)
Attribute createAttribute(HttpRequest request, String name)
throws NullPointerException, IllegalArgumentException;
/**
@ -47,7 +47,7 @@ public interface HttpDataFactory {
* @throws NullPointerException
* @throws IllegalArgumentException
*/
public Attribute createAttribute(HttpRequest request, String name, String value)
Attribute createAttribute(HttpRequest request, String name, String value)
throws NullPointerException, IllegalArgumentException;
/**
@ -60,9 +60,9 @@ public interface HttpDataFactory {
* @param size the size of the Uploaded file
* @return a new FileUpload
*/
public FileUpload createFileUpload(HttpRequest request, String name, String filename,
String contentType, String contentTransferEncoding, Charset charset,
long size) throws NullPointerException, IllegalArgumentException;
FileUpload createFileUpload(HttpRequest request, String name, String filename,
String contentType, String contentTransferEncoding, Charset charset,
long size) throws NullPointerException, IllegalArgumentException;
/**
* Remove the given InterfaceHttpData from clean list (will not delete the file, except if the file
@ -70,17 +70,17 @@ public interface HttpDataFactory {
* @param request associated request
* @param data
*/
public void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data);
void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data);
/**
* Remove all InterfaceHttpData from virtual File storage from clean list for the request
*
* @param request associated request
*/
public void cleanRequestHttpDatas(HttpRequest request);
void cleanRequestHttpDatas(HttpRequest request);
/**
* Remove all InterfaceHttpData from virtual File storage from clean list for all requests
*/
public void cleanAllHttpDatas();
void cleanAllHttpDatas();
}

View File

@ -24,7 +24,7 @@ package org.jboss.netty.handler.codec.http;
*
*/
public interface InterfaceHttpData extends Comparable<InterfaceHttpData> {
public static enum HttpDataType {
enum HttpDataType {
Attribute, FileUpload, InternalAttribute;
}

View File

@ -43,7 +43,7 @@ public interface IpFilterListener
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
* @return the associated ChannelFuture to be waited for before closing the channel. Null is allowed.
*/
public ChannelFuture allowed(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
ChannelFuture allowed(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
/**
* Called when the channel has the CONNECTED status and the channel was refused by a previous call to accept().
@ -56,7 +56,7 @@ public interface IpFilterListener
* @param inetSocketAddress the remote {@link InetSocketAddress} from client
* @return the associated ChannelFuture to be waited for before closing the channel. Null is allowed.
*/
public ChannelFuture refused(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
ChannelFuture refused(ChannelHandlerContext ctx, ChannelEvent e, InetSocketAddress inetSocketAddress);
/**
* Called in handleUpstream, if this channel was previously blocked,
@ -69,6 +69,6 @@ public interface IpFilterListener
* @return True if the event should continue, False if the event should not continue
* since this channel was blocked by this filter
*/
public boolean continues(ChannelHandlerContext ctx, ChannelEvent e);
boolean continues(ChannelHandlerContext ctx, ChannelEvent e);
}

View File

@ -27,11 +27,11 @@ public interface IpFilterRule extends IpSet
*
* @return True if this Rule is an ALLOW rule
*/
public boolean isAllowRule();
boolean isAllowRule();
/**
*
* @return True if this Rule is a DENY rule
*/
public boolean isDenyRule();
boolean isDenyRule();
}

View File

@ -32,10 +32,10 @@ public interface IpFilteringHandler
*
* @param listener the new ip filter listener
*/
public void setIpFilterListener(IpFilterListener listener);
void setIpFilterListener(IpFilterListener listener);
/**
* Remove the filter listener.
*/
public void removeIpFilterListener();
void removeIpFilterListener();
}

View File

@ -32,5 +32,5 @@ public interface IpSet
* @return returns true if the given IP address is contained in the current
* IpSet.
*/
public boolean contains(InetAddress inetAddress1);
boolean contains(InetAddress inetAddress1);
}