Skip to content

phaneesh/msgpack-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dropwizard MsgPack Bundle Travis build status

This bundle adds MsgPack support for dropwizard. This bundle compiles only on Java 8.

Dependencies

  • MsgPack 0.8.16
  • MsgPack Jackson 0.8.16

Usage

The bundle adds MsgPack support based on content negotiation. This makes it easier to switch between wire friendly and readable protocols.

Build instructions

  • Clone the source:

    git clone github.com/phaneesh/msgpack-bundle
    
  • Build

    mvn install
    

Maven Dependency

Use the following repository:

<repository>
    <id>clojars</id>
    <name>Clojars repository</name>
    <url>https://clojars.org/repo</url>
</repository>

Use the following maven dependency:

<dependency>
    <groupId>io.dropwizard</groupId>
    <artifactId>dropwizard-msgpack</artifactId>
    <version>1.3.7-1</version>
</dependency>

Using MsgPack bundle

Bootstrap

    @Override
    public void initialize(final Bootstrap...) {
        bootstrap.addBundle(new MsgPackBundle());
    }

Resource

    @GET
    @Produces({MediaType.APPLICATION_JSON, MsgPackMediaType.APPLICATION_MSGPACK})
    @Path("/example")
    @Metered
    public ExamplePojo example() {
        return ExamplePojo("hello");
    }

LICENSE

Copyright 2016 Phaneesh Nagaraja phaneesh.n@gmail.com.

Licensed 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.

About

MsgPack bundle for dropwizard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages