Permalink
Browse files

Remove 'public' modifier which is unnecessary

  • Loading branch information...
1 parent 65111fc commit a6f5af6116e25378bfd8b2ca657972ce2f7ead92 @trustin trustin committed Jun 12, 2012
Showing with 37 additions and 37 deletions.
  1. +37 −37 src/main/java/org/jboss/netty/handler/codec/spdy/SpdySession.java
@@ -35,26 +35,26 @@
SpdySession() {
}
- public int numActiveStreams() {
+ int numActiveStreams() {
return activeStreams.size();
}
- public boolean noActiveStreams() {
+ boolean noActiveStreams() {
return activeStreams.isEmpty();
}
- public boolean isActiveStream(int streamID) {
+ boolean isActiveStream(int streamID) {
return activeStreams.containsKey(new Integer(streamID));
}
// Stream-IDs should be iterated in priority order
- public Set<Integer> getActiveStreams() {
+ Set<Integer> getActiveStreams() {
TreeSet<Integer> StreamIDs = new TreeSet<Integer>(new PriorityComparator());
StreamIDs.addAll(activeStreams.keySet());
return StreamIDs;
}
- public void acceptStream(
+ void acceptStream(
int streamID, byte priority, boolean remoteSideClosed, boolean localSideClosed,
int sendWindowSize, int receiveWindowSize) {
if (!remoteSideClosed || !localSideClosed) {
@@ -64,7 +64,7 @@ public void acceptStream(
}
}
- public void removeStream(int streamID) {
+ void removeStream(int streamID) {
Integer StreamID = new Integer(streamID);
StreamState state = activeStreams.get(StreamID);
activeStreams.remove(StreamID);
@@ -77,12 +77,12 @@ public void removeStream(int streamID) {
}
}
- public boolean isRemoteSideClosed(int streamID) {
+ boolean isRemoteSideClosed(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state == null || state.isRemoteSideClosed();
}
- public void closeRemoteSide(int streamID) {
+ void closeRemoteSide(int streamID) {
Integer StreamID = new Integer(streamID);
StreamState state = activeStreams.get(StreamID);
if (state != null) {
@@ -93,12 +93,12 @@ public void closeRemoteSide(int streamID) {
}
}
- public boolean isLocalSideClosed(int streamID) {
+ boolean isLocalSideClosed(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state == null || state.isLocalSideClosed();
}
- public void closeLocalSide(int streamID) {
+ void closeLocalSide(int streamID) {
Integer StreamID = new Integer(streamID);
StreamState state = activeStreams.get(StreamID);
if (state != null) {
@@ -114,42 +114,42 @@ public void closeLocalSide(int streamID) {
* no need to synchronize access to the StreamState
*/
- public boolean hasReceivedReply(int streamID) {
+ boolean hasReceivedReply(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null && state.hasReceivedReply();
}
- public void receivedReply(int streamID) {
+ void receivedReply(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
if (state != null) {
state.receivedReply();
}
}
- public int getSendWindowSize(int streamID) {
+ int getSendWindowSize(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null ? state.getSendWindowSize() : -1;
}
- public int updateSendWindowSize(int streamID, int deltaWindowSize) {
+ int updateSendWindowSize(int streamID, int deltaWindowSize) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null ? state.updateSendWindowSize(deltaWindowSize) : -1;
}
- public int updateReceiveWindowSize(int streamID, int deltaWindowSize) {
+ int updateReceiveWindowSize(int streamID, int deltaWindowSize) {
StreamState state = activeStreams.get(new Integer(streamID));
if (deltaWindowSize > 0) {
state.setReceiveWindowSizeLowerBound(0);
}
return state != null ? state.updateReceiveWindowSize(deltaWindowSize) : -1;
}
- public int getReceiveWindowSizeLowerBound(int streamID) {
+ int getReceiveWindowSizeLowerBound(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null ? state.getReceiveWindowSizeLowerBound() : 0;
}
- public void updateAllReceiveWindowSizes(int deltaWindowSize) {
+ void updateAllReceiveWindowSizes(int deltaWindowSize) {
for (StreamState state: activeStreams.values()) {
state.updateReceiveWindowSize(deltaWindowSize);
if (deltaWindowSize < 0) {
@@ -158,17 +158,17 @@ public void updateAllReceiveWindowSizes(int deltaWindowSize) {
}
}
- public boolean putPendingWrite(int streamID, MessageEvent evt) {
+ boolean putPendingWrite(int streamID, MessageEvent evt) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null && state.putPendingWrite(evt);
}
- public MessageEvent getPendingWrite(int streamID) {
+ MessageEvent getPendingWrite(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null ? state.getPendingWrite() : null;
}
- public MessageEvent removePendingWrite(int streamID) {
+ MessageEvent removePendingWrite(int streamID) {
StreamState state = activeStreams.get(new Integer(streamID));
return state != null ? state.removePendingWrite() : null;
}
@@ -185,7 +185,7 @@ public MessageEvent removePendingWrite(int streamID) {
private final ConcurrentLinkedQueue<MessageEvent> pendingWriteQueue =
new ConcurrentLinkedQueue<MessageEvent>();
- public StreamState(
+ StreamState(
byte priority, boolean remoteSideClosed, boolean localSideClosed,
int sendWindowSize, int receiveWindowSize) {
this.priority = priority;
@@ -195,70 +195,70 @@ public StreamState(
this.receiveWindowSize = new AtomicInteger(receiveWindowSize);
}
- public byte getPriority() {
+ byte getPriority() {
return priority;
}
- public boolean isRemoteSideClosed() {
+ boolean isRemoteSideClosed() {
return remoteSideClosed;
}
- public void closeRemoteSide() {
+ void closeRemoteSide() {
remoteSideClosed = true;
}
- public boolean isLocalSideClosed() {
+ boolean isLocalSideClosed() {
return localSideClosed;
}
- public void closeLocalSide() {
+ void closeLocalSide() {
localSideClosed = true;
}
- public boolean hasReceivedReply() {
+ boolean hasReceivedReply() {
return receivedReply;
}
- public void receivedReply() {
+ void receivedReply() {
receivedReply = true;
}
- public int getSendWindowSize() {
+ int getSendWindowSize() {
return sendWindowSize.get();
}
- public int updateSendWindowSize(int deltaWindowSize) {
+ int updateSendWindowSize(int deltaWindowSize) {
return sendWindowSize.addAndGet(deltaWindowSize);
}
- public int updateReceiveWindowSize(int deltaWindowSize) {
+ int updateReceiveWindowSize(int deltaWindowSize) {
return receiveWindowSize.addAndGet(deltaWindowSize);
}
- public int getReceiveWindowSizeLowerBound() {
+ int getReceiveWindowSizeLowerBound() {
return receiveWindowSizeLowerBound;
}
- public void setReceiveWindowSizeLowerBound(int receiveWindowSizeLowerBound) {
+ void setReceiveWindowSizeLowerBound(int receiveWindowSizeLowerBound) {
this.receiveWindowSizeLowerBound = receiveWindowSizeLowerBound;
}
- public boolean putPendingWrite(MessageEvent evt) {
+ boolean putPendingWrite(MessageEvent evt) {
return pendingWriteQueue.offer(evt);
}
- public MessageEvent getPendingWrite() {
+ MessageEvent getPendingWrite() {
return pendingWriteQueue.peek();
}
- public MessageEvent removePendingWrite() {
+ MessageEvent removePendingWrite() {
return pendingWriteQueue.poll();
}
}
private final class PriorityComparator implements Comparator<Integer> {
- public PriorityComparator() {
+ PriorityComparator() {
super();
}

0 comments on commit a6f5af6

Please sign in to comment.