Package com.codingchili.core.protocol
Class ProtocolDescription<T>
java.lang.Object
com.codingchili.core.protocol.ProtocolDescription<T>
Contains protocol mappings and descriptions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetModel()
setDescription(String description)
setTemplate(Class<?> template)
-
Constructor Details
-
ProtocolDescription
public ProtocolDescription()
-
-
Method Details
-
setTemplate
- Parameters:
template
- the class template to use as a base for all requests.- Returns:
- fluent
-
getModel
- Returns:
- the base template to be used by all requests to this api, authentication etc.
-
setModel
- Parameters:
model
- the template described as a serialized model withSerializer.describe(Class)
- Returns:
- fluent
-
getDescription
- Returns:
- a description of the api.
-
setDescription
- Parameters:
description
- the description of the api.- Returns:
- fluent
-
getRoutes
- Returns:
- a map of routes that are available on the endpoint.
-
setRoutes
- Parameters:
routes
- a list of routes to be included in the generated api documentation.- Returns:
- fluent
-
setRoutes
- Parameters:
routes
- a map of routes to be included in the generated api documentation.- Returns:
- fluent
-
addRoute
- Parameters:
route
- a route to be included in the protocol description.- Returns:
- fluent
-
getTarget
- Returns:
- the endpoint (target) at which this api is mounted.
-
setTarget
- Parameters:
target
- the target node at which this api is available.- Returns:
- fluent
-