Moved constant classes out of util

This commit is contained in:
Trustin Lee 2013-11-04 20:10:52 +09:00
parent 5551fc7351
commit 3dd7fba320
6 changed files with 9 additions and 32 deletions

View File

@ -40,7 +40,7 @@ public interface BinaryMemcacheMessageHeader {
* Sets the magic byte.
*
* @param magic the magic byte to use.
* @see io.netty.handler.codec.memcache.binary.util.BinaryMemcacheOpcodes for typesafe opcodes.
* @see BinaryMemcacheOpcodes for typesafe opcodes.
*/
BinaryMemcacheMessageHeader setMagic(byte magic);

View File

@ -13,10 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.memcache.binary.util;
package io.netty.handler.codec.memcache.binary;
/**
* Represents all Opcodes that can occur in a {@link io.netty.handler.codec.memcache.binary.BinaryMemcacheMessage}.
* Represents all Opcodes that can occur in a {@link BinaryMemcacheMessage}.
* <p/>
* This class can be extended if a custom application needs to implement a superset of the normally supported
* operations by a vanilla memcached protocol.
@ -62,5 +62,4 @@ public final class BinaryMemcacheOpcodes {
public static final byte SASL_LIST_MECHS = 0x20;
public static final byte SASL_AUTH = 0x21;
public static final byte SASL_STEP = 0x22;
}

View File

@ -19,7 +19,7 @@ package io.netty.handler.codec.memcache.binary;
* Extends the common {@link BinaryMemcacheMessageHeader} header fields with hose who can only show up in
* {@link BinaryMemcacheResponse} messages.
*
* @see io.netty.handler.codec.memcache.binary.util.BinaryMemcacheResponseStatus
* @see BinaryMemcacheResponseStatus
*/
public interface BinaryMemcacheResponseHeader extends BinaryMemcacheMessageHeader {

View File

@ -13,11 +13,11 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.memcache.binary.util;
package io.netty.handler.codec.memcache.binary;
/**
* Contains all possible status values a
* {@link io.netty.handler.codec.memcache.binary.BinaryMemcacheResponseHeader} can return.
* {@link BinaryMemcacheResponseHeader} can return.
*/
public final class BinaryMemcacheResponseStatus {
@ -36,5 +36,4 @@ public final class BinaryMemcacheResponseStatus {
public static final short AUTH_CONTINUE = 0x21;
public static final short UNKNOWN_COMMAND = 0x81;
public static final short ENOMEM = 0x82;
}

View File

@ -1,20 +0,0 @@
/*
* Copyright 2013 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
/**
* Utility helpers for the binary protocol.
*/
package io.netty.handler.codec.memcache.binary.util;

View File

@ -21,21 +21,20 @@ import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.EncoderException;
import io.netty.handler.codec.memcache.DefaultLastMemcacheContent;
import io.netty.handler.codec.memcache.DefaultMemcacheContent;
import io.netty.handler.codec.memcache.binary.util.BinaryMemcacheOpcodes;
import io.netty.util.CharsetUtil;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.*;
/**
* Verifies the correct functionality of the {@link BinaryMemcacheEncoder}.
*/
public class BinaryMemcacheEncoderTest {
public static int DEFAULT_HEADER_SIZE = 24;
public static final int DEFAULT_HEADER_SIZE = 24;
private EmbeddedChannel channel;