*/
package org.opendaylight.protocol.pcep.impl;
+import com.google.common.base.Preconditions;
+
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelOutboundHandler;
-import org.opendaylight.protocol.pcep.spi.MessageHandlerRegistry;
-
-import com.google.common.base.Preconditions;
+import org.opendaylight.protocol.pcep.spi.MessageRegistry;
/**
* PCEP specific factory for protocol inbound/outbound handlers.
*/
public final class PCEPHandlerFactory {
- private final MessageHandlerRegistry registry;
- private final ChannelOutboundHandler encoder;
+ private final MessageRegistry registry;
+ private final ChannelOutboundHandler encoder;
- public PCEPHandlerFactory(final MessageHandlerRegistry registry) {
- this.registry = Preconditions.checkNotNull(registry);
- this.encoder = new PCEPMessageToByteEncoder(registry);
- }
+ public PCEPHandlerFactory(final MessageRegistry registry) {
+ this.registry = Preconditions.checkNotNull(registry);
+ this.encoder = new PCEPMessageToByteEncoder(registry);
+ }
- public ChannelHandler[] getEncoders() {
- return new ChannelHandler[] { this.encoder };
- }
+ public ChannelHandler[] getEncoders() {
+ return new ChannelHandler[] { this.encoder };
+ }
- public ChannelHandler[] getDecoders() {
- return new ChannelHandler[] {
- new PCEPMessageHeaderDecoder(),
- new PCEPByteToMessageDecoder(registry),
- };
- }
+ public ChannelHandler[] getDecoders() {
+ return new ChannelHandler[] { new PCEPMessageHeaderDecoder(), new PCEPByteToMessageDecoder(registry), };
+ }
}