ObjType
- A List of this type is expected in the input stream as JSON. Must be able to be converted to/from Mappublic abstract class AbstractListenerHandler<ObjType> extends Object implements ListenerHandler
Constructor and Description |
---|
AbstractListenerHandler(com.fasterxml.jackson.core.type.TypeReference<ObjType> inObjTypeRef)
The standard constructor takes in a type reference for the object and for a list of the object.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
delete(String id)
Delete the object for a particular id
|
protected abstract Object |
get(String id)
Get the object for a particular id
|
protected abstract Map<String,ObjType> |
getAll() |
javax.ws.rs.core.Response |
handleDELETE(String id) |
javax.ws.rs.core.Response |
handleGET(String id) |
javax.ws.rs.core.Response |
handleGETAll() |
javax.ws.rs.core.Response |
handlePOST(InputStream inputStream,
com.fasterxml.jackson.databind.ObjectMapper mapper,
String id) |
javax.ws.rs.core.Response |
handlePOSTAll(InputStream inputStream,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
abstract Object |
post(Map<String,ObjType> inputObject)
Process a POST request of the input items
|
void |
use_AbstractListenerHandler_instead() |
public AbstractListenerHandler(com.fasterxml.jackson.core.type.TypeReference<ObjType> inObjTypeRef)
inObjTypeRef
- The TypeReference for the input object typepublic final javax.ws.rs.core.Response handlePOST(InputStream inputStream, com.fasterxml.jackson.databind.ObjectMapper mapper, String id)
handlePOST
in interface ListenerHandler
public final javax.ws.rs.core.Response handlePOSTAll(InputStream inputStream, com.fasterxml.jackson.databind.ObjectMapper mapper)
handlePOSTAll
in interface ListenerHandler
public final javax.ws.rs.core.Response handleGET(String id)
handleGET
in interface ListenerHandler
public final javax.ws.rs.core.Response handleGETAll()
handleGETAll
in interface ListenerHandler
public final javax.ws.rs.core.Response handleDELETE(String id)
handleDELETE
in interface ListenerHandler
public final void use_AbstractListenerHandler_instead()
use_AbstractListenerHandler_instead
in interface ListenerHandler
@Nullable protected abstract Object delete(String id)
id
- A string id of the object to be deleted. This id is never null or empty.@Nullable protected abstract Object get(String id)
id
- A string id of the object desired. This id is never null or empty.Copyright © 2011–2017. All rights reserved.