Sprockets EE

Base Servlets that read and write JSON objects or Protocol Buffers messages

License

License

Categories

Categories

Net
GroupId

GroupId

net.sf.sprockets
ArtifactId

ArtifactId

sprockets-ee
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Sprockets EE
Base Servlets that read and write JSON objects or Protocol Buffers messages
Project URL

Project URL

https://pushbit.github.io/sprockets-ee
Source Code Management

Source Code Management

https://github.com/pushbit/sprockets-ee

Download sprockets-ee

How to add to project

<!-- https://jarcasting.com/artifacts/net.sf.sprockets/sprockets-ee/ -->
<dependency>
    <groupId>net.sf.sprockets</groupId>
    <artifactId>sprockets-ee</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.sf.sprockets/sprockets-ee/
implementation 'net.sf.sprockets:sprockets-ee:3.0.0'
// https://jarcasting.com/artifacts/net.sf.sprockets/sprockets-ee/
implementation ("net.sf.sprockets:sprockets-ee:3.0.0")
'net.sf.sprockets:sprockets-ee:jar:3.0.0'
<dependency org="net.sf.sprockets" name="sprockets-ee" rev="3.0.0">
  <artifact name="sprockets-ee" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.sf.sprockets', module='sprockets-ee', version='3.0.0')
)
libraryDependencies += "net.sf.sprockets" % "sprockets-ee" % "3.0.0"
[net.sf.sprockets/sprockets-ee "3.0.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.8.0
com.squareup.wire : wire-runtime jar 2.3.0-RC1
net.sf.sprockets : sprockets jar 4.0.0

provided (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.1.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Sprockets for Java EE Javadoc Maven Central

Create Servlets that automatically read and write JSON objects or Protocol Buffers messages.

Example

Your Servlet will be sent an order in JSON and it will respond with a confirmation in JSON.

public class OrderServlet extends JsonServlet<Order, Confirmation> {
    @Override
    protected Confirmation jsonPost(Order order,
            HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        Confirmation confirmation = process(order);
        return confirmation;
    }
}

WireServlet follows the same pattern but reads and writes Protocol Buffers messages instead of JSON objects.

Install

<dependency>
    <groupId>net.sf.sprockets</groupId>
    <artifactId>sprockets-ee</artifactId>
    <version>3.0.0</version>
</dependency>

Versions

Version
3.0.0
2.1.0
2.0.0