Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 809: Enhancements to the toaster example"
[controller.git]
/
opendaylight
/
netconf
/
netconf-util
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
util
/
AbstractNetconfSession.java
diff --git
a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSession.java
b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSession.java
index 270af3505f63a7589ab0957c1177badb72b6ab1d..c789206436f1eecb1fd92fc1480a027eb8943d09 100644
(file)
--- a/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSession.java
+++ b/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/AbstractNetconfSession.java
@@
-61,7
+61,7
@@
public abstract class AbstractNetconfSession<S extends NetconfSession, L extends
@Override
public ChannelFuture sendMessage(final NetconfMessage netconfMessage) {
final ChannelFuture future = channel.writeAndFlush(netconfMessage);
@Override
public ChannelFuture sendMessage(final NetconfMessage netconfMessage) {
final ChannelFuture future = channel.writeAndFlush(netconfMessage);
- if (delayedEncoder !=null) {
+ if (delayedEncoder !=
null) {
replaceMessageEncoder(delayedEncoder);
delayedEncoder = null;
}
replaceMessageEncoder(delayedEncoder);
delayedEncoder = null;
}
@@
-93,23
+93,19
@@
public abstract class AbstractNetconfSession<S extends NetconfSession, L extends
return sb.toString();
}
return sb.toString();
}
- protected <T extends ChannelHandler> T removeHandler(final Class<T> handlerType) {
- return this.channel.pipeline().remove(handlerType);
- }
-
- protected void replaceMessageDecoder(final ChannelHandler handler) {
+ protected final void replaceMessageDecoder(final ChannelHandler handler) {
replaceChannelHandler(AbstractChannelInitializer.NETCONF_MESSAGE_DECODER, handler);
}
replaceChannelHandler(AbstractChannelInitializer.NETCONF_MESSAGE_DECODER, handler);
}
- protected void replaceMessageEncoder(final ChannelHandler handler) {
+ protected
final
void replaceMessageEncoder(final ChannelHandler handler) {
replaceChannelHandler(AbstractChannelInitializer.NETCONF_MESSAGE_ENCODER, handler);
}
replaceChannelHandler(AbstractChannelInitializer.NETCONF_MESSAGE_ENCODER, handler);
}
- protected void replaceMessageEncoderAfterNextMessage(final ChannelHandler handler) {
+ protected
final
void replaceMessageEncoderAfterNextMessage(final ChannelHandler handler) {
this.delayedEncoder = handler;
}
this.delayedEncoder = handler;
}
- protected void replaceChannelHandler(final String handlerName, final ChannelHandler handler) {
+ protected
final
void replaceChannelHandler(final String handlerName, final ChannelHandler handler) {
channel.pipeline().replace(handlerName, handlerName, handler);
}
channel.pipeline().replace(handlerName, handlerName, handler);
}
@@
-124,7
+120,7
@@
public abstract class AbstractNetconfSession<S extends NetconfSession, L extends
}
final NetconfEXICodec exiCodec = new NetconfEXICodec(exiParams.getOptions());
addExiHandlers(exiCodec);
}
final NetconfEXICodec exiCodec = new NetconfEXICodec(exiParams.getOptions());
addExiHandlers(exiCodec);
- logger.debug("
EXI handlers added to pipeline on session {}
", this);
+ logger.debug("
Session {} EXI handlers added to pipeline
", this);
}
protected abstract void addExiHandlers(NetconfEXICodec exiCodec);
}
protected abstract void addExiHandlers(NetconfEXICodec exiCodec);