// Path: cocaine-services/src/main/java/cocaine/CocaineDeserializer.java
// public interface CocaineDeserializer {
// 
//     <T> T deserialize(byte[] bytes, Type type) throws IOException;
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/CocaineSerializer.java
// public interface CocaineSerializer {
// 
//     byte[] serialize(Parameter[] parameters, Object[] values) throws IOException;
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/MessagePackDeserializer.java
// public class MessagePackDeserializer implements CocaineDeserializer {
// 
//     private final MessagePack messagePack;
// 
//     @Inject
//     public MessagePackDeserializer(MessagePack messagePack) {
//         this.messagePack = messagePack;
//     }
// 
//     @SuppressWarnings("unchecked")
//     @Override
//     public <T> T deserialize(byte[] bytes, Type type) throws IOException {
//         Template<T> template = (Template<T>) messagePack.lookup(type);
//         return messagePack.read(bytes, template);
//     }
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/MessagePackSerializer.java
// public class MessagePackSerializer extends BaseSerializer {
// 
//     private final MessagePack messagePack;
// 
//     @Inject
//     public MessagePackSerializer(MessagePack messagePack) {
//         this.messagePack = messagePack;
//     }
// 
//     @Override
//     public byte[] serialize(Object data) throws IOException {
//         return messagePack.write(data);
//     }
// 
// }


import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import cocaine.CocaineDeserializer;
import cocaine.CocaineSerializer;
import cocaine.MessagePackDeserializer;
import cocaine.MessagePackSerializer;
package cocaine.annotations;



/**
 * @author Anton Bobukh <abobukh@yandex-team.ru>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface CocaineMethod {

    String value() default "";

    Class<? extends CocaineSerializer> serializer() default MessagePackSerializer.class;

// Path: cocaine-services/src/main/java/cocaine/CocaineDeserializer.java
// public interface CocaineDeserializer {
// 
//     <T> T deserialize(byte[] bytes, Type type) throws IOException;
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/CocaineSerializer.java
// public interface CocaineSerializer {
// 
//     byte[] serialize(Parameter[] parameters, Object[] values) throws IOException;
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/MessagePackDeserializer.java
// public class MessagePackDeserializer implements CocaineDeserializer {
// 
//     private final MessagePack messagePack;
// 
//     @Inject
//     public MessagePackDeserializer(MessagePack messagePack) {
//         this.messagePack = messagePack;
//     }
// 
//     @SuppressWarnings("unchecked")
//     @Override
//     public <T> T deserialize(byte[] bytes, Type type) throws IOException {
//         Template<T> template = (Template<T>) messagePack.lookup(type);
//         return messagePack.read(bytes, template);
//     }
// 
// }
// 
// Path: cocaine-services/src/main/java/cocaine/MessagePackSerializer.java
// public class MessagePackSerializer extends BaseSerializer {
// 
//     private final MessagePack messagePack;
// 
//     @Inject
//     public MessagePackSerializer(MessagePack messagePack) {
//         this.messagePack = messagePack;
//     }
// 
//     @Override
//     public byte[] serialize(Object data) throws IOException {
//         return messagePack.write(data);
//     }
// 
// }


// Path: cocaine-services/src/main/java/cocaine/annotations/CocaineMethod.java
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import cocaine.CocaineDeserializer;
import cocaine.CocaineSerializer;
import cocaine.MessagePackDeserializer;
import cocaine.MessagePackSerializer;

package cocaine.annotations;



/**
 * @author Anton Bobukh <abobukh@yandex-team.ru>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface CocaineMethod {

    String value() default "";

    Class<? extends CocaineSerializer> serializer() default MessagePackSerializer.class;

    Class<? extends CocaineDeserializer> deserializer() default MessagePackDeserializer.class;