public interface Callback extends Constructible, Extensible<Callback>, Reference<Callback>
A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
Modifier and Type | Method and Description |
---|---|
Callback |
addPathItem(java.lang.String name,
PathItem pathItem)
Adds the given PathItem to this Callback's list of PathItems using the string as its key.
|
default PathItem |
getPathItem(java.lang.String name)
Returns a path item for a given name.
|
java.util.Map<java.lang.String,PathItem> |
getPathItems()
Returns a copy map (potentially immutable) of the path items.
|
default boolean |
hasPathItem(java.lang.String name)
Check whether a path item is present to the map.
|
void |
removePathItem(java.lang.String name)
Removes the given path item of the Callback PathItems.
|
void |
setPathItems(java.util.Map<java.lang.String,PathItem> items)
Set the path items map to this Callback.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
Callback addPathItem(java.lang.String name, PathItem pathItem)
name
- a runtime expression that can be evaluated in the context of a runtime HTTP request/responsepathItem
- a path to add to this Callback's list of PathItems. null values will be rejected (implementation will throw an exception) or
ignored.void removePathItem(java.lang.String name)
name
- a path name that will be removed.java.util.Map<java.lang.String,PathItem> getPathItems()
void setPathItems(java.util.Map<java.lang.String,PathItem> items)
items
- a map containing the list of paths.default boolean hasPathItem(java.lang.String name)
getPathItems().containsKey(name)
name
- a path name in the format valid for a Paths object.default PathItem getPathItem(java.lang.String name)
getPathItems().get(name)
name
- a path name in the format valid for a Paths object.