Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ public boolean isEvent() {
}

public void setEvent(String event) {
mEvent = true;
mData = event;
this.mEvent = true;
this.mData = event;
}

public void setEvent(boolean mEvent) {
Comment thread
beiwei30 marked this conversation as resolved.
this.mEvent = mEvent;
}

public boolean isBroken() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@

/**
* ExchangeCodec.
*
*
*
*/
public class ExchangeCodec extends TelnetCodec {

Expand Down Expand Up @@ -176,7 +173,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
req.setVersion(Version.getProtocolVersion());
req.setTwoWay((flag & FLAG_TWOWAY) != 0);
if ((flag & FLAG_EVENT) != 0) {
req.setEvent(Request.HEARTBEAT_EVENT);
req.setEvent(true);
}
try {
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static void sent(Channel channel, Request request) {
* @param channel channel to close
*/
public static void closeChannel(Channel channel) {
for (Map.Entry<Long, Channel> entry: CHANNELS.entrySet()) {
for (Map.Entry<Long, Channel> entry : CHANNELS.entrySet()) {
if (channel.equals(entry.getValue())) {
DefaultFuture future = getFuture(entry.getKey());
if (future != null && !future.isDone()) {
Expand Down Expand Up @@ -255,7 +255,6 @@ private void invokeCallback(ResponseCallback c) {
if (callbackCopy == null) {
throw new NullPointerException("callback cannot be null.");
}
c = null;
Response res = response;
if (res == null) {
throw new IllegalStateException("response cannot be null. url:" + channel.getUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
req.setVersion(Version.getProtocolVersion());
req.setTwoWay((flag & FLAG_TWOWAY) != 0);
if ((flag & FLAG_EVENT) != 0) {
req.setEvent(Request.HEARTBEAT_EVENT);
req.setEvent(true);
}
try {
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
req.setVersion(Version.getProtocolVersion());
req.setTwoWay((flag & FLAG_TWOWAY) != 0);
if ((flag & FLAG_EVENT) != 0) {
req.setEvent(Request.HEARTBEAT_EVENT);
req.setEvent(true);
}
try {
Object data;
Expand Down Expand Up @@ -145,6 +145,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
req.setBroken(true);
req.setData(t);
}

return req;
}
}
Expand Down