id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
49,000
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractMappedPolicy.java
AbstractMappedPolicy.doProcessFailure
protected void doProcessFailure(PolicyFailure failure, IPolicyContext context, C config, IPolicyFailureChain chain) { chain.doFailure(failure); }
java
protected void doProcessFailure(PolicyFailure failure, IPolicyContext context, C config, IPolicyFailureChain chain) { chain.doFailure(failure); }
[ "protected", "void", "doProcessFailure", "(", "PolicyFailure", "failure", ",", "IPolicyContext", "context", ",", "C", "config", ",", "IPolicyFailureChain", "chain", ")", "{", "chain", ".", "doFailure", "(", "failure", ")", ";", "}" ]
Override if you wish to modify a failure. @see IPolicy#processFailure(PolicyFailure, IPolicyContext, Object)
[ "Override", "if", "you", "wish", "to", "modify", "a", "failure", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractMappedPolicy.java#L116-L118
49,001
apiman/apiman
manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroService.java
ManagerApiMicroService.createSecurityHandler
protected SecurityHandler createSecurityHandler() throws Exception { HashLoginService l = new HashLoginService(); // UserStore is now separate store entity and must be added to HashLoginService UserStore userStore = new UserStore(); l.setUserStore(userStore); for (User user : Use...
java
protected SecurityHandler createSecurityHandler() throws Exception { HashLoginService l = new HashLoginService(); // UserStore is now separate store entity and must be added to HashLoginService UserStore userStore = new UserStore(); l.setUserStore(userStore); for (User user : Use...
[ "protected", "SecurityHandler", "createSecurityHandler", "(", ")", "throws", "Exception", "{", "HashLoginService", "l", "=", "new", "HashLoginService", "(", ")", ";", "// UserStore is now separate store entity and must be added to HashLoginService", "UserStore", "userStore", "=...
Creates a basic auth security handler. @throws Exception
[ "Creates", "a", "basic", "auth", "security", "handler", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroService.java#L217-L233
49,002
apiman/apiman
manager/api/hawkular/src/main/java/io/apiman/manager/api/hawkular/HawkularMetricsAccessor.java
HawkularMetricsAccessor.bucketSizeFromInterval
private static BucketSizeType bucketSizeFromInterval(HistogramIntervalType interval) { BucketSizeType bucketSize; switch (interval) { case minute: bucketSize = BucketSizeType.Minute; break; case hour: bucketSize = BucketSizeType.Hour; break...
java
private static BucketSizeType bucketSizeFromInterval(HistogramIntervalType interval) { BucketSizeType bucketSize; switch (interval) { case minute: bucketSize = BucketSizeType.Minute; break; case hour: bucketSize = BucketSizeType.Hour; break...
[ "private", "static", "BucketSizeType", "bucketSizeFromInterval", "(", "HistogramIntervalType", "interval", ")", "{", "BucketSizeType", "bucketSize", ";", "switch", "(", "interval", ")", "{", "case", "minute", ":", "bucketSize", "=", "BucketSizeType", ".", "Minute", ...
Converts an interval into a bucket size. @param interval
[ "Converts", "an", "interval", "into", "a", "bucket", "size", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/hawkular/src/main/java/io/apiman/manager/api/hawkular/HawkularMetricsAccessor.java#L313-L336
49,003
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcInitializer.java
JdbcInitializer.doInit
@SuppressWarnings("nls") private void doInit() { QueryRunner run = new QueryRunner(ds); Boolean isInitialized; try { isInitialized = run.query("SELECT * FROM gw_apis", new ResultSetHandler<Boolean>() { @Override public Boolean handle(Resul...
java
@SuppressWarnings("nls") private void doInit() { QueryRunner run = new QueryRunner(ds); Boolean isInitialized; try { isInitialized = run.query("SELECT * FROM gw_apis", new ResultSetHandler<Boolean>() { @Override public Boolean handle(Resul...
[ "@", "SuppressWarnings", "(", "\"nls\"", ")", "private", "void", "doInit", "(", ")", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", "ds", ")", ";", "Boolean", "isInitialized", ";", "try", "{", "isInitialized", "=", "run", ".", "query", "(", "...
Do the initialization work.
[ "Do", "the", "initialization", "work", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcInitializer.java#L72-L110
49,004
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/IgnoredResourcesPolicy.java
IgnoredResourcesPolicy.satisfiesAnyPath
private boolean satisfiesAnyPath(IgnoredResourcesConfig config, String destination, String verb) { if (destination == null || destination.trim().length() == 0) { destination = "/"; //$NON-NLS-1$ } for (IgnoredResource resource : config.getRules()) { String resourceVerb = ...
java
private boolean satisfiesAnyPath(IgnoredResourcesConfig config, String destination, String verb) { if (destination == null || destination.trim().length() == 0) { destination = "/"; //$NON-NLS-1$ } for (IgnoredResource resource : config.getRules()) { String resourceVerb = ...
[ "private", "boolean", "satisfiesAnyPath", "(", "IgnoredResourcesConfig", "config", ",", "String", "destination", ",", "String", "verb", ")", "{", "if", "(", "destination", "==", "null", "||", "destination", ".", "trim", "(", ")", ".", "length", "(", ")", "==...
Evaluates whether the destination provided matches any of the configured rules @param config The {@link IgnoredResourcesConfig} containing the rules @param destination The destination to evaluate @param verb HTTP verb or '*' for all verbs @return true if any path matches the destination. false otherwise
[ "Evaluates", "whether", "the", "destination", "provided", "matches", "any", "of", "the", "configured", "rules" ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/IgnoredResourcesPolicy.java#L85-L99
49,005
apiman/apiman
manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java
GatewayClient.readPublishingException
private PublishingException readPublishingException(HttpResponse response) { InputStream is = null; PublishingException exception; try { is = response.getEntity().getContent(); GatewayApiErrorBean error = mapper.reader(GatewayApiErrorBean.class).readValue(is); ...
java
private PublishingException readPublishingException(HttpResponse response) { InputStream is = null; PublishingException exception; try { is = response.getEntity().getContent(); GatewayApiErrorBean error = mapper.reader(GatewayApiErrorBean.class).readValue(is); ...
[ "private", "PublishingException", "readPublishingException", "(", "HttpResponse", "response", ")", "{", "InputStream", "is", "=", "null", ";", "PublishingException", "exception", ";", "try", "{", "is", "=", "response", ".", "getEntity", "(", ")", ".", "getContent"...
Reads a publishing exception from the response. @param response
[ "Reads", "a", "publishing", "exception", "from", "the", "response", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java#L263-L280
49,006
apiman/apiman
manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java
GatewayClient.parseStackTrace
protected static StackTraceElement[] parseStackTrace(String stacktrace) { try (BufferedReader reader = new BufferedReader(new StringReader(stacktrace))) { List<StackTraceElement> elements = new ArrayList<>(); String line; // Example lines: // \tat io.apiman.gatewa...
java
protected static StackTraceElement[] parseStackTrace(String stacktrace) { try (BufferedReader reader = new BufferedReader(new StringReader(stacktrace))) { List<StackTraceElement> elements = new ArrayList<>(); String line; // Example lines: // \tat io.apiman.gatewa...
[ "protected", "static", "StackTraceElement", "[", "]", "parseStackTrace", "(", "String", "stacktrace", ")", "{", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "StringReader", "(", "stacktrace", ")", ")", ")", "{", "List", "<"...
Parses a stack trace from the given string. @param stacktrace
[ "Parses", "a", "stack", "trace", "from", "the", "given", "string", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java#L309-L339
49,007
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultComponentRegistry.java
DefaultComponentRegistry.addComponent
protected <T extends IComponent> void addComponent(Class<T> componentType, T component) { components.put(componentType, component); }
java
protected <T extends IComponent> void addComponent(Class<T> componentType, T component) { components.put(componentType, component); }
[ "protected", "<", "T", "extends", "IComponent", ">", "void", "addComponent", "(", "Class", "<", "T", ">", "componentType", ",", "T", "component", ")", "{", "components", ".", "put", "(", "componentType", ",", "component", ")", ";", "}" ]
Adds a component to the registry. @param componentType @param component
[ "Adds", "a", "component", "to", "the", "registry", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultComponentRegistry.java#L107-L109
49,008
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/Starter.java
Starter.main
public static final void main(String [] args) throws Exception { GatewayMicroService microService = new GatewayMicroService(); microService.start(); microService.join(); }
java
public static final void main(String [] args) throws Exception { GatewayMicroService microService = new GatewayMicroService(); microService.start(); microService.join(); }
[ "public", "static", "final", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "GatewayMicroService", "microService", "=", "new", "GatewayMicroService", "(", ")", ";", "microService", ".", "start", "(", ")", ";", "microService",...
Main entry point for the API Gateway micro service. @param args the arguments @throws Exception when any unhandled exception occurs
[ "Main", "entry", "point", "for", "the", "API", "Gateway", "micro", "service", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/Starter.java#L32-L36
49,009
apiman/apiman
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/connector/ConnectorFactory.java
ConnectorFactory.createConnector
@Override public IApiConnector createConnector(ApiRequest req, Api api, RequiredAuthType authType, boolean hasDataPolicy, IConnectorConfig connectorConfig) { return (request, resultHandler) -> { // Apply options from config as our base case ApimanHttpConnectorOptions httpOptions = ne...
java
@Override public IApiConnector createConnector(ApiRequest req, Api api, RequiredAuthType authType, boolean hasDataPolicy, IConnectorConfig connectorConfig) { return (request, resultHandler) -> { // Apply options from config as our base case ApimanHttpConnectorOptions httpOptions = ne...
[ "@", "Override", "public", "IApiConnector", "createConnector", "(", "ApiRequest", "req", ",", "Api", "api", ",", "RequiredAuthType", "authType", ",", "boolean", "hasDataPolicy", ",", "IConnectorConfig", "connectorConfig", ")", "{", "return", "(", "request", ",", "...
In the future we can switch to different back-end implementations here!
[ "In", "the", "future", "we", "can", "switch", "to", "different", "back", "-", "end", "implementations", "here!" ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/connector/ConnectorFactory.java#L87-L103
49,010
apiman/apiman
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/connector/ConnectorFactory.java
ConnectorFactory.setAttributesFromApiEndpointProperties
private void setAttributesFromApiEndpointProperties(Api api, ApimanHttpConnectorOptions options) { try { Map<String, String> endpointProperties = api.getEndpointProperties(); if (endpointProperties.containsKey("timeouts.read")) { //$NON-NLS-1$ int connectTimeoutMs = Integ...
java
private void setAttributesFromApiEndpointProperties(Api api, ApimanHttpConnectorOptions options) { try { Map<String, String> endpointProperties = api.getEndpointProperties(); if (endpointProperties.containsKey("timeouts.read")) { //$NON-NLS-1$ int connectTimeoutMs = Integ...
[ "private", "void", "setAttributesFromApiEndpointProperties", "(", "Api", "api", ",", "ApimanHttpConnectorOptions", "options", ")", "{", "try", "{", "Map", "<", "String", ",", "String", ">", "endpointProperties", "=", "api", ".", "getEndpointProperties", "(", ")", ...
If the endpoint properties includes a read timeout override, then set it here. @param connection
[ "If", "the", "endpoint", "properties", "includes", "a", "read", "timeout", "override", "then", "set", "it", "here", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/connector/ConnectorFactory.java#L126-L140
49,011
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ConfigDrivenComponentRegistry.java
ConfigDrivenComponentRegistry.createAndRegisterComponent
public <T extends IComponent> T createAndRegisterComponent(Class<T> componentType) throws ComponentNotFoundException { try { synchronized (components) { Class<? extends T> componentClass = engineConfig.getComponentClass(componentType, pluginRegistry); Map<String, Stri...
java
public <T extends IComponent> T createAndRegisterComponent(Class<T> componentType) throws ComponentNotFoundException { try { synchronized (components) { Class<? extends T> componentClass = engineConfig.getComponentClass(componentType, pluginRegistry); Map<String, Stri...
[ "public", "<", "T", "extends", "IComponent", ">", "T", "createAndRegisterComponent", "(", "Class", "<", "T", ">", "componentType", ")", "throws", "ComponentNotFoundException", "{", "try", "{", "synchronized", "(", "components", ")", "{", "Class", "<", "?", "ex...
Creates the component and registers it in the registry. @param componentType the component type @return the component @throws ComponentNotFoundException when a policy tries to get a component from the context but the component doesn't exist or is otherwise not available.
[ "Creates", "the", "component", "and", "registers", "it", "in", "the", "registry", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ConfigDrivenComponentRegistry.java#L83-L118
49,012
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ConfigDrivenComponentRegistry.java
ConfigDrivenComponentRegistry.addComponentMapping
protected void addComponentMapping(Class<? extends IComponent> klazz, IComponent component) { components.put(klazz, component); }
java
protected void addComponentMapping(Class<? extends IComponent> klazz, IComponent component) { components.put(klazz, component); }
[ "protected", "void", "addComponentMapping", "(", "Class", "<", "?", "extends", "IComponent", ">", "klazz", ",", "IComponent", "component", ")", "{", "components", ".", "put", "(", "klazz", ",", "component", ")", ";", "}" ]
Add a component that may have been instantiated elsewhere. @param klazz component class @param component instantiated component of same class
[ "Add", "a", "component", "that", "may", "have", "been", "instantiated", "elsewhere", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ConfigDrivenComponentRegistry.java#L125-L127
49,013
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.registerRateLimiterComponent
protected void registerRateLimiterComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + IRateLimiterComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESRateLimiterComponent.class.getName()); setConfigProperty(componentPropName + "...
java
protected void registerRateLimiterComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + IRateLimiterComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESRateLimiterComponent.class.getName()); setConfigProperty(componentPropName + "...
[ "protected", "void", "registerRateLimiterComponent", "(", ")", "{", "String", "componentPropName", "=", "GatewayConfigProperties", ".", "COMPONENT_PREFIX", "+", "IRateLimiterComponent", ".", "class", ".", "getSimpleName", "(", ")", ";", "setConfigProperty", "(", "compon...
The rate limiter component.
[ "The", "rate", "limiter", "component", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L142-L152
49,014
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.registerSharedStateComponent
protected void registerSharedStateComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ISharedStateComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESSharedStateComponent.class.getName()); setConfigProperty(componentPropName + "...
java
protected void registerSharedStateComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ISharedStateComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESSharedStateComponent.class.getName()); setConfigProperty(componentPropName + "...
[ "protected", "void", "registerSharedStateComponent", "(", ")", "{", "String", "componentPropName", "=", "GatewayConfigProperties", ".", "COMPONENT_PREFIX", "+", "ISharedStateComponent", ".", "class", ".", "getSimpleName", "(", ")", ";", "setConfigProperty", "(", "compon...
The shared state component.
[ "The", "shared", "state", "component", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L157-L167
49,015
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.registerCacheStoreComponent
protected void registerCacheStoreComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ICacheStoreComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESCacheStoreComponent.class.getName()); setConfigProperty(componentPropName + ".cl...
java
protected void registerCacheStoreComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ICacheStoreComponent.class.getSimpleName(); setConfigProperty(componentPropName, ESCacheStoreComponent.class.getName()); setConfigProperty(componentPropName + ".cl...
[ "protected", "void", "registerCacheStoreComponent", "(", ")", "{", "String", "componentPropName", "=", "GatewayConfigProperties", ".", "COMPONENT_PREFIX", "+", "ICacheStoreComponent", ".", "class", ".", "getSimpleName", "(", ")", ";", "setConfigProperty", "(", "componen...
The cache store component.
[ "The", "cache", "store", "component", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L172-L183
49,016
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.registerJdbcComponent
protected void registerJdbcComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + IJdbcComponent.class.getSimpleName(); setConfigProperty(componentPropName, DefaultJdbcComponent.class.getName()); }
java
protected void registerJdbcComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + IJdbcComponent.class.getSimpleName(); setConfigProperty(componentPropName, DefaultJdbcComponent.class.getName()); }
[ "protected", "void", "registerJdbcComponent", "(", ")", "{", "String", "componentPropName", "=", "GatewayConfigProperties", ".", "COMPONENT_PREFIX", "+", "IJdbcComponent", ".", "class", ".", "getSimpleName", "(", ")", ";", "setConfigProperty", "(", "componentPropName", ...
The jdbc component.
[ "The", "jdbc", "component", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L188-L191
49,017
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.registerLdapComponent
protected void registerLdapComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ILdapComponent.class.getSimpleName(); setConfigProperty(componentPropName, DefaultLdapComponent.class.getName()); }
java
protected void registerLdapComponent() { String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ILdapComponent.class.getSimpleName(); setConfigProperty(componentPropName, DefaultLdapComponent.class.getName()); }
[ "protected", "void", "registerLdapComponent", "(", ")", "{", "String", "componentPropName", "=", "GatewayConfigProperties", ".", "COMPONENT_PREFIX", "+", "ILdapComponent", ".", "class", ".", "getSimpleName", "(", ")", ";", "setConfigProperty", "(", "componentPropName", ...
The ldap component.
[ "The", "ldap", "component", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L196-L199
49,018
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.configureConnectorFactory
protected void configureConnectorFactory() { setConfigProperty(GatewayConfigProperties.CONNECTOR_FACTORY_CLASS, HttpConnectorFactory.class.getName()); setConfigProperty(GatewayConfigProperties.CONNECTOR_FACTORY_CLASS + ".http.timeouts.read", "25"); setConfigProperty(GatewayConfigProperties.CONNE...
java
protected void configureConnectorFactory() { setConfigProperty(GatewayConfigProperties.CONNECTOR_FACTORY_CLASS, HttpConnectorFactory.class.getName()); setConfigProperty(GatewayConfigProperties.CONNECTOR_FACTORY_CLASS + ".http.timeouts.read", "25"); setConfigProperty(GatewayConfigProperties.CONNE...
[ "protected", "void", "configureConnectorFactory", "(", ")", "{", "setConfigProperty", "(", "GatewayConfigProperties", ".", "CONNECTOR_FACTORY_CLASS", ",", "HttpConnectorFactory", ".", "class", ".", "getName", "(", ")", ")", ";", "setConfigProperty", "(", "GatewayConfigP...
The connector factory.
[ "The", "connector", "factory", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L211-L217
49,019
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.configureRegistry
protected void configureRegistry() { setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS, PollCachingESRegistry.class.getName()); setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS + ".client.type", "jest"); setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS + ".client.protocol"...
java
protected void configureRegistry() { setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS, PollCachingESRegistry.class.getName()); setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS + ".client.type", "jest"); setConfigProperty(GatewayConfigProperties.REGISTRY_CLASS + ".client.protocol"...
[ "protected", "void", "configureRegistry", "(", ")", "{", "setConfigProperty", "(", "GatewayConfigProperties", ".", "REGISTRY_CLASS", ",", "PollCachingESRegistry", ".", "class", ".", "getName", "(", ")", ")", ";", "setConfigProperty", "(", "GatewayConfigProperties", "....
The registry.
[ "The", "registry", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L229-L237
49,020
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.configureMetrics
protected void configureMetrics() { setConfigProperty(GatewayConfigProperties.METRICS_CLASS, ESMetrics.class.getName()); setConfigProperty(GatewayConfigProperties.METRICS_CLASS + ".client.type", "jest"); setConfigProperty(GatewayConfigProperties.METRICS_CLASS + ".client.protocol", "${apiman.es.p...
java
protected void configureMetrics() { setConfigProperty(GatewayConfigProperties.METRICS_CLASS, ESMetrics.class.getName()); setConfigProperty(GatewayConfigProperties.METRICS_CLASS + ".client.type", "jest"); setConfigProperty(GatewayConfigProperties.METRICS_CLASS + ".client.protocol", "${apiman.es.p...
[ "protected", "void", "configureMetrics", "(", ")", "{", "setConfigProperty", "(", "GatewayConfigProperties", ".", "METRICS_CLASS", ",", "ESMetrics", ".", "class", ".", "getName", "(", ")", ")", ";", "setConfigProperty", "(", "GatewayConfigProperties", ".", "METRICS_...
Configure the metrics system.
[ "Configure", "the", "metrics", "system", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L242-L251
49,021
apiman/apiman
gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java
GatewayMicroService.setConfigProperty
protected void setConfigProperty(String propName, String propValue) { if (System.getProperty(propName) == null) { System.setProperty(propName, propValue); } }
java
protected void setConfigProperty(String propName, String propValue) { if (System.getProperty(propName) == null) { System.setProperty(propName, propValue); } }
[ "protected", "void", "setConfigProperty", "(", "String", "propName", ",", "String", "propValue", ")", "{", "if", "(", "System", ".", "getProperty", "(", "propName", ")", "==", "null", ")", "{", "System", ".", "setProperty", "(", "propName", ",", "propValue",...
Sets a system property if it's not already set. @param propName @param propValue
[ "Sets", "a", "system", "property", "if", "it", "s", "not", "already", "set", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/war/micro/src/main/java/io/apiman/gateway/platforms/war/micro/GatewayMicroService.java#L258-L262
49,022
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java
RateLimiterBucket.resetIfNecessary
public boolean resetIfNecessary(RateBucketPeriod period) { long periodBoundary = getLastPeriodBoundary(period); if (System.currentTimeMillis() >= periodBoundary) { setCount(0); return true; } return false; }
java
public boolean resetIfNecessary(RateBucketPeriod period) { long periodBoundary = getLastPeriodBoundary(period); if (System.currentTimeMillis() >= periodBoundary) { setCount(0); return true; } return false; }
[ "public", "boolean", "resetIfNecessary", "(", "RateBucketPeriod", "period", ")", "{", "long", "periodBoundary", "=", "getLastPeriodBoundary", "(", "period", ")", ";", "if", "(", "System", ".", "currentTimeMillis", "(", ")", ">=", "periodBoundary", ")", "{", "set...
Resets the count if the period boundary has been crossed. Returns true if the count was reset to 0 or false otherwise. @param period the period
[ "Resets", "the", "count", "if", "the", "period", "boundary", "has", "been", "crossed", ".", "Returns", "true", "if", "the", "count", "was", "reset", "to", "0", "or", "false", "otherwise", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java#L46-L53
49,023
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java
RateLimiterBucket.getResetMillis
public long getResetMillis(RateBucketPeriod period) { long now = System.currentTimeMillis(); long periodBoundary = getPeriodBoundary(now, period); return periodBoundary - now; }
java
public long getResetMillis(RateBucketPeriod period) { long now = System.currentTimeMillis(); long periodBoundary = getPeriodBoundary(now, period); return periodBoundary - now; }
[ "public", "long", "getResetMillis", "(", "RateBucketPeriod", "period", ")", "{", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "periodBoundary", "=", "getPeriodBoundary", "(", "now", ",", "period", ")", ";", "return", "periodBo...
Returns the number of millis until the period resets. @param period the period @return millis until period resets
[ "Returns", "the", "number", "of", "millis", "until", "the", "period", "resets", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java#L60-L64
49,024
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java
RateLimiterBucket.getPeriodBoundary
private static long getPeriodBoundary(long timestamp, RateBucketPeriod period) { Calendar lastCal = Calendar.getInstance(); lastCal.setTimeInMillis(timestamp); switch (period) { case Second: lastCal.set(Calendar.MILLISECOND, 0); lastCal.add(Calendar.SECOND, 1); ...
java
private static long getPeriodBoundary(long timestamp, RateBucketPeriod period) { Calendar lastCal = Calendar.getInstance(); lastCal.setTimeInMillis(timestamp); switch (period) { case Second: lastCal.set(Calendar.MILLISECOND, 0); lastCal.add(Calendar.SECOND, 1); ...
[ "private", "static", "long", "getPeriodBoundary", "(", "long", "timestamp", ",", "RateBucketPeriod", "period", ")", "{", "Calendar", "lastCal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "lastCal", ".", "setTimeInMillis", "(", "timestamp", ")", ";", "...
Gets the boundary timestamp for the given rate bucket period. In other words, returns the timestamp associated with when the rate period will reset. @param timestamp @param period
[ "Gets", "the", "boundary", "timestamp", "for", "the", "given", "rate", "bucket", "period", ".", "In", "other", "words", "returns", "the", "timestamp", "associated", "with", "when", "the", "rate", "period", "will", "reset", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java#L81-L125
49,025
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/PluginResourceImpl.java
PluginResourceImpl.loadRegistry
private PluginRegistryBean loadRegistry(URI registryUrl) { PluginRegistryBean fromCache = registryCache.get(registryUrl); if (fromCache != null) { return fromCache; } try { PluginRegistryBean registry = mapper.reader(PluginRegistryBean.class).readValue(registryUrl...
java
private PluginRegistryBean loadRegistry(URI registryUrl) { PluginRegistryBean fromCache = registryCache.get(registryUrl); if (fromCache != null) { return fromCache; } try { PluginRegistryBean registry = mapper.reader(PluginRegistryBean.class).readValue(registryUrl...
[ "private", "PluginRegistryBean", "loadRegistry", "(", "URI", "registryUrl", ")", "{", "PluginRegistryBean", "fromCache", "=", "registryCache", ".", "get", "(", "registryUrl", ")", ";", "if", "(", "fromCache", "!=", "null", ")", "{", "return", "fromCache", ";", ...
Loads a plugin registry from its URL. Will use the value in the cache if it exists. If not, it will connect to the remote URL and grab the registry JSON file. @param registryUrl the URL of the registry
[ "Loads", "a", "plugin", "registry", "from", "its", "URL", ".", "Will", "use", "the", "value", "in", "the", "cache", "if", "it", "exists", ".", "If", "not", "it", "will", "connect", "to", "the", "remote", "URL", "and", "grab", "the", "registry", "JSON",...
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/PluginResourceImpl.java#L417-L429
49,026
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/beans/PoliciesBean.java
PoliciesBean.from
public static final PoliciesBean from(PolicyBean policy) { PoliciesBean rval = new PoliciesBean(); rval.setType(policy.getType()); rval.setOrganizationId(policy.getOrganizationId()); rval.setEntityId(policy.getEntityId()); rval.setEntityVersion(policy.getEntityVersion()); ...
java
public static final PoliciesBean from(PolicyBean policy) { PoliciesBean rval = new PoliciesBean(); rval.setType(policy.getType()); rval.setOrganizationId(policy.getOrganizationId()); rval.setEntityId(policy.getEntityId()); rval.setEntityVersion(policy.getEntityVersion()); ...
[ "public", "static", "final", "PoliciesBean", "from", "(", "PolicyBean", "policy", ")", "{", "PoliciesBean", "rval", "=", "new", "PoliciesBean", "(", ")", ";", "rval", ".", "setType", "(", "policy", ".", "getType", "(", ")", ")", ";", "rval", ".", "setOrg...
Create a new Policies object from the given policy bean instance. @param policy the policy @return the policies
[ "Create", "a", "new", "Policies", "object", "from", "the", "given", "policy", "bean", "instance", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/beans/PoliciesBean.java#L50-L58
49,027
apiman/apiman
manager/api/migrator/src/main/java/io/apiman/manager/api/migrator/VersionMigrators.java
VersionMigrators.chain
public static VersionMigratorChain chain(String fromVersion, String toVersion) { List<IVersionMigrator> matchedMigrators = new ArrayList<>(); for (Entry entry : migrators) { if (entry.isBetween(fromVersion, toVersion)) { matchedMigrators.add(entry.migrator); } ...
java
public static VersionMigratorChain chain(String fromVersion, String toVersion) { List<IVersionMigrator> matchedMigrators = new ArrayList<>(); for (Entry entry : migrators) { if (entry.isBetween(fromVersion, toVersion)) { matchedMigrators.add(entry.migrator); } ...
[ "public", "static", "VersionMigratorChain", "chain", "(", "String", "fromVersion", ",", "String", "toVersion", ")", "{", "List", "<", "IVersionMigrator", ">", "matchedMigrators", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Entry", "entry", ":", ...
Gets the chain of migrators to use when migrating from version X to version Y. @param fromVersion @param toVersion
[ "Gets", "the", "chain", "of", "migrators", "to", "use", "when", "migrating", "from", "version", "X", "to", "version", "Y", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/migrator/src/main/java/io/apiman/manager/api/migrator/VersionMigrators.java#L41-L49
49,028
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.createTenant
public void createTenant(String tenantId) { TenantBean tenant = new TenantBean(tenantId); try { URL endpoint = serverUrl.toURI().resolve("tenants").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .post(toBody(t...
java
public void createTenant(String tenantId) { TenantBean tenant = new TenantBean(tenantId); try { URL endpoint = serverUrl.toURI().resolve("tenants").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .post(toBody(t...
[ "public", "void", "createTenant", "(", "String", "tenantId", ")", "{", "TenantBean", "tenant", "=", "new", "TenantBean", "(", "tenantId", ")", ";", "try", "{", "URL", "endpoint", "=", "serverUrl", ".", "toURI", "(", ")", ".", "resolve", "(", "\"tenants\"",...
Creates a new tenant. @param tenantId
[ "Creates", "a", "new", "tenant", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L168-L184
49,029
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.listCounterMetrics
public List<MetricBean> listCounterMetrics(String tenantId) { try { URL endpoint = serverUrl.toURI().resolve("counters").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .header("Accept", "application/json") //$NON-NLS-...
java
public List<MetricBean> listCounterMetrics(String tenantId) { try { URL endpoint = serverUrl.toURI().resolve("counters").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .header("Accept", "application/json") //$NON-NLS-...
[ "public", "List", "<", "MetricBean", ">", "listCounterMetrics", "(", "String", "tenantId", ")", "{", "try", "{", "URL", "endpoint", "=", "serverUrl", ".", "toURI", "(", ")", ".", "resolve", "(", "\"counters\"", ")", ".", "toURL", "(", ")", ";", "//$NON-N...
Get a list of all counter metrics for a given tenant. @param tenantId
[ "Get", "a", "list", "of", "all", "counter", "metrics", "for", "a", "given", "tenant", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L190-L210
49,030
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.addCounterDataPoint
public DataPointLongBean addCounterDataPoint(String tenantId, String counterId, Date timestamp, long value) { List<DataPointLongBean> dataPoints = new ArrayList<>(); DataPointLongBean dataPoint = new DataPointLongBean(timestamp, value); dataPoints.add(dataPoint); addCounterDataPoints(ten...
java
public DataPointLongBean addCounterDataPoint(String tenantId, String counterId, Date timestamp, long value) { List<DataPointLongBean> dataPoints = new ArrayList<>(); DataPointLongBean dataPoint = new DataPointLongBean(timestamp, value); dataPoints.add(dataPoint); addCounterDataPoints(ten...
[ "public", "DataPointLongBean", "addCounterDataPoint", "(", "String", "tenantId", ",", "String", "counterId", ",", "Date", "timestamp", ",", "long", "value", ")", "{", "List", "<", "DataPointLongBean", ">", "dataPoints", "=", "new", "ArrayList", "<>", "(", ")", ...
Adds a single data point to the given counter. @param tenantId @param counterId @param timestamp @param value
[ "Adds", "a", "single", "data", "point", "to", "the", "given", "counter", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L219-L225
49,031
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.addMultipleCounterDataPoints
public void addMultipleCounterDataPoints(String tenantId, List<MetricLongBean> data) { try { URL endpoint = serverUrl.toURI().resolve("counters/raw").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .post(toBody(data)) ...
java
public void addMultipleCounterDataPoints(String tenantId, List<MetricLongBean> data) { try { URL endpoint = serverUrl.toURI().resolve("counters/raw").toURL(); //$NON-NLS-1$ Request request = new Request.Builder() .url(endpoint) .post(toBody(data)) ...
[ "public", "void", "addMultipleCounterDataPoints", "(", "String", "tenantId", ",", "List", "<", "MetricLongBean", ">", "data", ")", "{", "try", "{", "URL", "endpoint", "=", "serverUrl", ".", "toURI", "(", ")", ".", "resolve", "(", "\"counters/raw\"", ")", "."...
Adds one or more data points for multiple counters all at once! @param tenantId @param data
[ "Adds", "one", "or", "more", "data", "points", "for", "multiple", "counters", "all", "at", "once!" ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L272-L287
49,032
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.tags
public static Map<String, String> tags(String ... strings) { Map<String, String> tags = new HashMap<>(); for (int i = 0; i < strings.length - 1; i+=2) { String key = strings[i]; String value = strings[i + 1]; if (key != null && value != null) { tags.pu...
java
public static Map<String, String> tags(String ... strings) { Map<String, String> tags = new HashMap<>(); for (int i = 0; i < strings.length - 1; i+=2) { String key = strings[i]; String value = strings[i + 1]; if (key != null && value != null) { tags.pu...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "tags", "(", "String", "...", "strings", ")", "{", "Map", "<", "String", ",", "String", ">", "tags", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Simple method to create some tags. @param strings @return
[ "Simple", "method", "to", "create", "some", "tags", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L418-L428
49,033
apiman/apiman
common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java
HawkularMetricsClient.encodeTags
protected static String encodeTags(Map<String, String> tags) { if (tags == null) { return null; } try { StringBuilder builder = new StringBuilder(); boolean first = true; for (Entry<String, String> entry : tags.entrySet()) { if (!fi...
java
protected static String encodeTags(Map<String, String> tags) { if (tags == null) { return null; } try { StringBuilder builder = new StringBuilder(); boolean first = true; for (Entry<String, String> entry : tags.entrySet()) { if (!fi...
[ "protected", "static", "String", "encodeTags", "(", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "if", "(", "tags", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", ...
Encodes the tags into the format expected by HM. @param tags
[ "Encodes", "the", "tags", "into", "the", "format", "expected", "by", "HM", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/net/src/main/java/io/apiman/common/net/hawkular/HawkularMetricsClient.java#L442-L463
49,034
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/PollCachingESRegistry.java
PollCachingESRegistry.startCacheInvalidator
protected void startCacheInvalidator() { polling = true; Thread thread = new Thread(new Runnable() { @Override public void run() { // Wait for 30s on startup before starting to poll. try { Thread.sleep(startupDelayMillis); } catch (InterruptedExcep...
java
protected void startCacheInvalidator() { polling = true; Thread thread = new Thread(new Runnable() { @Override public void run() { // Wait for 30s on startup before starting to poll. try { Thread.sleep(startupDelayMillis); } catch (InterruptedExcep...
[ "protected", "void", "startCacheInvalidator", "(", ")", "{", "polling", "=", "true", ";", "Thread", "thread", "=", "new", "Thread", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "// Wait for 30s on startup be...
Starts up a thread that polls the ES store for updates.
[ "Starts", "up", "a", "thread", "that", "polls", "the", "ES", "store", "for", "updates", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/PollCachingESRegistry.java#L174-L190
49,035
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/policy/Chain.java
Chain.chainPolicyHandlers
public void chainPolicyHandlers() { IReadWriteStream<H> previousHandler = null; Iterator<PolicyWithConfiguration> iterator = iterator(); while (iterator.hasNext()) { final PolicyWithConfiguration pwc = iterator.next(); final IPolicy policy = pwc.getPolicy(); f...
java
public void chainPolicyHandlers() { IReadWriteStream<H> previousHandler = null; Iterator<PolicyWithConfiguration> iterator = iterator(); while (iterator.hasNext()) { final PolicyWithConfiguration pwc = iterator.next(); final IPolicy policy = pwc.getPolicy(); f...
[ "public", "void", "chainPolicyHandlers", "(", ")", "{", "IReadWriteStream", "<", "H", ">", "previousHandler", "=", "null", ";", "Iterator", "<", "PolicyWithConfiguration", ">", "iterator", "=", "iterator", "(", ")", ";", "while", "(", "iterator", ".", "hasNext...
Chain together the body handlers.
[ "Chain", "together", "the", "body", "handlers", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/policy/Chain.java#L78-L134
49,036
apiman/apiman
common/util/src/main/java/io/apiman/common/util/ssl/KeyStoreUtil.java
KeyStoreUtil.getKeyManagers
public static KeyManager[] getKeyManagers(Info pathInfo) throws Exception { if (pathInfo.store == null) { return null; } File clientKeyStoreFile = new File(pathInfo.store); if (!clientKeyStoreFile.isFile()) { throw new Exception("No KeyManager: " + pathInfo.store ...
java
public static KeyManager[] getKeyManagers(Info pathInfo) throws Exception { if (pathInfo.store == null) { return null; } File clientKeyStoreFile = new File(pathInfo.store); if (!clientKeyStoreFile.isFile()) { throw new Exception("No KeyManager: " + pathInfo.store ...
[ "public", "static", "KeyManager", "[", "]", "getKeyManagers", "(", "Info", "pathInfo", ")", "throws", "Exception", "{", "if", "(", "pathInfo", ".", "store", "==", "null", ")", "{", "return", "null", ";", "}", "File", "clientKeyStoreFile", "=", "new", "File...
Gets the array of key managers for a given info store+info. @param pathInfo @throws Exception
[ "Gets", "the", "array", "of", "key", "managers", "for", "a", "given", "info", "store", "+", "info", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/util/src/main/java/io/apiman/common/util/ssl/KeyStoreUtil.java#L37-L54
49,037
apiman/apiman
common/util/src/main/java/io/apiman/common/util/ssl/KeyStoreUtil.java
KeyStoreUtil.getTrustManagers
public static TrustManager[] getTrustManagers(Info pathInfo) throws Exception { File trustStoreFile = new File(pathInfo.store); if (!trustStoreFile.isFile()) { throw new Exception("No TrustManager: " + pathInfo.store + " does not exist."); } String trustStorePassword = pathIn...
java
public static TrustManager[] getTrustManagers(Info pathInfo) throws Exception { File trustStoreFile = new File(pathInfo.store); if (!trustStoreFile.isFile()) { throw new Exception("No TrustManager: " + pathInfo.store + " does not exist."); } String trustStorePassword = pathIn...
[ "public", "static", "TrustManager", "[", "]", "getTrustManagers", "(", "Info", "pathInfo", ")", "throws", "Exception", "{", "File", "trustStoreFile", "=", "new", "File", "(", "pathInfo", ".", "store", ")", ";", "if", "(", "!", "trustStoreFile", ".", "isFile"...
Gets an array of trust managers for a given store+password. @param pathInfo @return @throws Exception
[ "Gets", "an", "array", "of", "trust", "managers", "for", "a", "given", "store", "+", "password", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/util/src/main/java/io/apiman/common/util/ssl/KeyStoreUtil.java#L63-L77
49,038
apiman/apiman
manager/api/hawkular/src/main/java/io/apiman/manager/api/hawkular/TopNSortedMap.java
TopNSortedMap.popLastItem
private void popLastItem() { KeyValue<K,V> lastKV = items.last(); items.remove(lastKV); index.remove(lastKV.key); }
java
private void popLastItem() { KeyValue<K,V> lastKV = items.last(); items.remove(lastKV); index.remove(lastKV.key); }
[ "private", "void", "popLastItem", "(", ")", "{", "KeyValue", "<", "K", ",", "V", ">", "lastKV", "=", "items", ".", "last", "(", ")", ";", "items", ".", "remove", "(", "lastKV", ")", ";", "index", ".", "remove", "(", "lastKV", ".", "key", ")", ";"...
Removes the last item in the list.
[ "Removes", "the", "last", "item", "in", "the", "list", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/hawkular/src/main/java/io/apiman/manager/api/hawkular/TopNSortedMap.java#L102-L106
49,039
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java
BasicAuthenticationPolicy.validateCredentials
private void validateCredentials(String username, String password, ApiRequest request, IPolicyContext context, BasicAuthenticationConfig config, IAsyncResultHandler<Boolean> handler) { if (config.getStaticIdentity() != null) { staticIdentityValidator.validate(username, password, request,...
java
private void validateCredentials(String username, String password, ApiRequest request, IPolicyContext context, BasicAuthenticationConfig config, IAsyncResultHandler<Boolean> handler) { if (config.getStaticIdentity() != null) { staticIdentityValidator.validate(username, password, request,...
[ "private", "void", "validateCredentials", "(", "String", "username", ",", "String", "password", ",", "ApiRequest", "request", ",", "IPolicyContext", "context", ",", "BasicAuthenticationConfig", "config", ",", "IAsyncResultHandler", "<", "Boolean", ">", "handler", ")",...
Validate the inbound authentication credentials. @param username @param password @param request @param context @param config @param handler
[ "Validate", "the", "inbound", "authentication", "credentials", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java#L162-L173
49,040
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java
BasicAuthenticationPolicy.sendAuthFailure
protected void sendAuthFailure(IPolicyContext context, IPolicyChain<?> chain, BasicAuthenticationConfig config, int reason) { IPolicyFailureFactoryComponent pff = context.getComponent(IPolicyFailureFactoryComponent.class); PolicyFailure failure = pff.createFailure(PolicyFailureType.Authentication, reaso...
java
protected void sendAuthFailure(IPolicyContext context, IPolicyChain<?> chain, BasicAuthenticationConfig config, int reason) { IPolicyFailureFactoryComponent pff = context.getComponent(IPolicyFailureFactoryComponent.class); PolicyFailure failure = pff.createFailure(PolicyFailureType.Authentication, reaso...
[ "protected", "void", "sendAuthFailure", "(", "IPolicyContext", "context", ",", "IPolicyChain", "<", "?", ">", "chain", ",", "BasicAuthenticationConfig", "config", ",", "int", "reason", ")", "{", "IPolicyFailureFactoryComponent", "pff", "=", "context", ".", "getCompo...
Sends the 'unauthenticated' response as a policy failure. @param context @param chain @param config @param reason
[ "Sends", "the", "unauthenticated", "response", "as", "a", "policy", "failure", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/BasicAuthenticationPolicy.java#L182-L191
49,041
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/CachingESRegistry.java
CachingESRegistry.getApiIdx
private String getApiIdx(String orgId, String apiId, String version) { return "API::" + orgId + "|" + apiId + "|" + version; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ }
java
private String getApiIdx(String orgId, String apiId, String version) { return "API::" + orgId + "|" + apiId + "|" + version; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ }
[ "private", "String", "getApiIdx", "(", "String", "orgId", ",", "String", "apiId", ",", "String", "version", ")", "{", "return", "\"API::\"", "+", "orgId", "+", "\"|\"", "+", "apiId", "+", "\"|\"", "+", "version", ";", "//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$",...
Generates an in-memory key for an API, used to index the app for later quick retrieval. @param orgId @param apiId @param version @return a API key
[ "Generates", "an", "in", "-", "memory", "key", "for", "an", "API", "used", "to", "index", "the", "app", "for", "later", "quick", "retrieval", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/CachingESRegistry.java#L196-L198
49,042
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java
JdbcRegistry.unregisterApiContracts
protected void unregisterApiContracts(Client client, Connection connection) throws SQLException { QueryRunner run = new QueryRunner(); run.update(connection, "DELETE FROM contracts WHERE client_org_id = ? AND client_id = ? AND client_version = ?", //$NON-NLS-1$ client.getOrganizationId(...
java
protected void unregisterApiContracts(Client client, Connection connection) throws SQLException { QueryRunner run = new QueryRunner(); run.update(connection, "DELETE FROM contracts WHERE client_org_id = ? AND client_id = ? AND client_version = ?", //$NON-NLS-1$ client.getOrganizationId(...
[ "protected", "void", "unregisterApiContracts", "(", "Client", "client", ",", "Connection", "connection", ")", "throws", "SQLException", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", ")", ";", "run", ".", "update", "(", "connection", ",", "\"DELETE F...
Removes all of the api contracts from the database. @param client @param connection @throws SQLException
[ "Removes", "all", "of", "the", "api", "contracts", "from", "the", "database", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java#L139-L143
49,043
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java
JdbcRegistry.getApiInternal
protected Api getApiInternal(String organizationId, String apiId, String apiVersion) throws SQLException { QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_apis WHERE org_id = ? AND id = ? AND version = ?", //$NON-NLS-1$ Handlers.API_HANDLER, organizationId, a...
java
protected Api getApiInternal(String organizationId, String apiId, String apiVersion) throws SQLException { QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_apis WHERE org_id = ? AND id = ? AND version = ?", //$NON-NLS-1$ Handlers.API_HANDLER, organizationId, a...
[ "protected", "Api", "getApiInternal", "(", "String", "organizationId", ",", "String", "apiId", ",", "String", "apiVersion", ")", "throws", "SQLException", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", "ds", ")", ";", "return", "run", ".", "query",...
Gets an api from the DB. @param organizationId @param apiId @param apiVersion @throws SQLException
[ "Gets", "an", "api", "from", "the", "DB", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java#L247-L251
49,044
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java
JdbcRegistry.getClientInternal
protected Client getClientInternal(String apiKey) throws SQLException { QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_clients WHERE api_key = ?", //$NON-NLS-1$ Handlers.CLIENT_HANDLER, apiKey); }
java
protected Client getClientInternal(String apiKey) throws SQLException { QueryRunner run = new QueryRunner(ds); return run.query("SELECT bean FROM gw_clients WHERE api_key = ?", //$NON-NLS-1$ Handlers.CLIENT_HANDLER, apiKey); }
[ "protected", "Client", "getClientInternal", "(", "String", "apiKey", ")", "throws", "SQLException", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", "ds", ")", ";", "return", "run", ".", "query", "(", "\"SELECT bean FROM gw_clients WHERE api_key = ?\"", ",...
Simply pull the client from storage. @param apiKey @throws SQLException
[ "Simply", "pull", "the", "client", "from", "storage", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java#L271-L275
49,045
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.doBasicAuth
protected void doBasicAuth(Creds credentials, HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { try { if (credentials.username.equals(request.getRemoteUser())) { // Already logged in as this user - do nothi...
java
protected void doBasicAuth(Creds credentials, HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { try { if (credentials.username.equals(request.getRemoteUser())) { // Already logged in as this user - do nothi...
[ "protected", "void", "doBasicAuth", "(", "Creds", "credentials", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "try", "{", "if", "(", "credential...
Handle BASIC authentication. Delegates this to the container by invoking 'login' on the inbound http servlet request object. @param credentials the credentials @param request the http servlet request @param response the http servlet respose @param chain the filter chain @throws IOException when I/O failure occurs in f...
[ "Handle", "BASIC", "authentication", ".", "Delegates", "this", "to", "the", "container", "by", "invoking", "login", "on", "the", "inbound", "http", "servlet", "request", "object", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L218-L241
49,046
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.doFilterChain
protected void doFilterChain(ServletRequest request, ServletResponse response, FilterChain chain, AuthPrincipal principal) throws IOException, ServletException { if (principal == null) { chain.doFilter(request, response); } else { HttpServletRequest hsr; h...
java
protected void doFilterChain(ServletRequest request, ServletResponse response, FilterChain chain, AuthPrincipal principal) throws IOException, ServletException { if (principal == null) { chain.doFilter(request, response); } else { HttpServletRequest hsr; h...
[ "protected", "void", "doFilterChain", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ",", "AuthPrincipal", "principal", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "principal", "==", "nul...
Further process the filter chain. @param request the request @param response the response @param chain the filter chain @param principal the auth principal @throws IOException when I/O failure occurs in filter chain @throws ServletException when servlet exception occurs during auth
[ "Further", "process", "the", "filter", "chain", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L269-L278
49,047
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.wrapTheRequest
private HttpServletRequest wrapTheRequest(final ServletRequest request, final AuthPrincipal principal) { HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest) request) { @Override public Principal getUserPrincipal() { return principal; ...
java
private HttpServletRequest wrapTheRequest(final ServletRequest request, final AuthPrincipal principal) { HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper((HttpServletRequest) request) { @Override public Principal getUserPrincipal() { return principal; ...
[ "private", "HttpServletRequest", "wrapTheRequest", "(", "final", "ServletRequest", "request", ",", "final", "AuthPrincipal", "principal", ")", "{", "HttpServletRequestWrapper", "wrapper", "=", "new", "HttpServletRequestWrapper", "(", "(", "HttpServletRequest", ")", "reque...
Wrap the request to provide the principal. @param request the request @param principal the principal
[ "Wrap", "the", "request", "to", "provide", "the", "principal", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L285-L303
49,048
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.parseAuthorizationBasic
private Creds parseAuthorizationBasic(String authHeader) { String userpassEncoded = authHeader.substring(6); String data = StringUtils.newStringUtf8(Base64.decodeBase64(userpassEncoded)); int sepIdx = data.indexOf(':'); if (sepIdx > 0) { String username = data.substring(0, se...
java
private Creds parseAuthorizationBasic(String authHeader) { String userpassEncoded = authHeader.substring(6); String data = StringUtils.newStringUtf8(Base64.decodeBase64(userpassEncoded)); int sepIdx = data.indexOf(':'); if (sepIdx > 0) { String username = data.substring(0, se...
[ "private", "Creds", "parseAuthorizationBasic", "(", "String", "authHeader", ")", "{", "String", "userpassEncoded", "=", "authHeader", ".", "substring", "(", "6", ")", ";", "String", "data", "=", "StringUtils", ".", "newStringUtf8", "(", "Base64", ".", "decodeBas...
Parses the Authorization request header into a username and password. @param authHeader the auth header
[ "Parses", "the", "Authorization", "request", "header", "into", "a", "username", "and", "password", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L309-L320
49,049
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.parseAuthorizationToken
private AuthToken parseAuthorizationToken(String authHeader) { try { String tokenEncoded = authHeader.substring(11); return AuthTokenUtil.consumeToken(tokenEncoded); } catch (IllegalArgumentException e) { // TODO log this error return null; } }
java
private AuthToken parseAuthorizationToken(String authHeader) { try { String tokenEncoded = authHeader.substring(11); return AuthTokenUtil.consumeToken(tokenEncoded); } catch (IllegalArgumentException e) { // TODO log this error return null; } }
[ "private", "AuthToken", "parseAuthorizationToken", "(", "String", "authHeader", ")", "{", "try", "{", "String", "tokenEncoded", "=", "authHeader", ".", "substring", "(", "11", ")", ";", "return", "AuthTokenUtil", ".", "consumeToken", "(", "tokenEncoded", ")", ";...
Parses the Authorization request to retrieve the Base64 encoded auth token. @param authHeader the auth header
[ "Parses", "the", "Authorization", "request", "to", "retrieve", "the", "Base64", "encoded", "auth", "token", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L326-L334
49,050
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java
AuthenticationFilter.sendAuthResponse
private void sendAuthResponse(HttpServletResponse response) throws IOException { response.setHeader("WWW-Authenticate", String.format("Basic realm=\"%1$s\"", realm)); //$NON-NLS-1$ //$NON-NLS-2$ response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }
java
private void sendAuthResponse(HttpServletResponse response) throws IOException { response.setHeader("WWW-Authenticate", String.format("Basic realm=\"%1$s\"", realm)); //$NON-NLS-1$ //$NON-NLS-2$ response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }
[ "private", "void", "sendAuthResponse", "(", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "response", ".", "setHeader", "(", "\"WWW-Authenticate\"", ",", "String", ".", "format", "(", "\"Basic realm=\\\"%1$s\\\"\"", ",", "realm", ")", ")", ";...
Sends a response that tells the client that authentication is required. @param response the response @throws IOException when an error cannot be sent
[ "Sends", "a", "response", "that", "tells", "the", "client", "that", "authentication", "is", "required", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/AuthenticationFilter.java#L341-L344
49,051
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java
URLRewritingPolicy.replaceHeaders
private void replaceHeaders(URLRewritingConfig config, HeaderMap headers) { for (Entry<String, String> entry : headers) { String key = entry.getKey(); String value = entry.getValue(); value = doHeaderReplaceAll(value, config.getFromRegex(), config.getToReplacement()); ...
java
private void replaceHeaders(URLRewritingConfig config, HeaderMap headers) { for (Entry<String, String> entry : headers) { String key = entry.getKey(); String value = entry.getValue(); value = doHeaderReplaceAll(value, config.getFromRegex(), config.getToReplacement()); ...
[ "private", "void", "replaceHeaders", "(", "URLRewritingConfig", "config", ",", "HeaderMap", "headers", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "entry", ":", "headers", ")", "{", "String", "key", "=", "entry", ".", "getKey", "(", ...
Perform replacement. @param config @param headers
[ "Perform", "replacement", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java#L91-L100
49,052
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java
URLRewritingPolicy.doHeaderReplaceAll
private String doHeaderReplaceAll(String headerValue, String fromRegex, String toReplacement) { return headerValue.replaceAll(fromRegex, toReplacement); }
java
private String doHeaderReplaceAll(String headerValue, String fromRegex, String toReplacement) { return headerValue.replaceAll(fromRegex, toReplacement); }
[ "private", "String", "doHeaderReplaceAll", "(", "String", "headerValue", ",", "String", "fromRegex", ",", "String", "toReplacement", ")", "{", "return", "headerValue", ".", "replaceAll", "(", "fromRegex", ",", "toReplacement", ")", ";", "}" ]
Finds all matching instances of the regular expression and replaces them with the replacement value. @param headerValue @param fromRegex @param toReplacement
[ "Finds", "all", "matching", "instances", "of", "the", "regular", "expression", "and", "replaces", "them", "with", "the", "replacement", "value", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/URLRewritingPolicy.java#L109-L111
49,053
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/DefaultESClientFactory.java
DefaultESClientFactory.createJestClient
protected JestClient createJestClient(Map<String, String> config, String indexName, String defaultIndexName) { String host = config.get("client.host"); //$NON-NLS-1$ String port = config.get("client.port"); //$NON-NLS-1$ String protocol = config.get("client.protocol"); //$NON-NLS-1$ Stri...
java
protected JestClient createJestClient(Map<String, String> config, String indexName, String defaultIndexName) { String host = config.get("client.host"); //$NON-NLS-1$ String port = config.get("client.port"); //$NON-NLS-1$ String protocol = config.get("client.protocol"); //$NON-NLS-1$ Stri...
[ "protected", "JestClient", "createJestClient", "(", "Map", "<", "String", ",", "String", ">", "config", ",", "String", "indexName", ",", "String", "defaultIndexName", ")", "{", "String", "host", "=", "config", ".", "get", "(", "\"client.host\"", ")", ";", "/...
Creates a transport client from a configuration map. @param config the configuration @param indexName the name of the index @param defaultIndexName the default index name @return the ES client
[ "Creates", "a", "transport", "client", "from", "a", "configuration", "map", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/DefaultESClientFactory.java#L79-L126
49,054
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/DefaultESClientFactory.java
DefaultESClientFactory.updateHttpConfig
protected void updateHttpConfig(Builder httpClientConfig, Map<String, String> config) { String username = config.get("client.username"); //$NON-NLS-1$ String password = config.get("client.password"); //$NON-NLS-1$ String timeout = config.get("client.timeout"); //$NON-NLS-1$ if (StringUti...
java
protected void updateHttpConfig(Builder httpClientConfig, Map<String, String> config) { String username = config.get("client.username"); //$NON-NLS-1$ String password = config.get("client.password"); //$NON-NLS-1$ String timeout = config.get("client.timeout"); //$NON-NLS-1$ if (StringUti...
[ "protected", "void", "updateHttpConfig", "(", "Builder", "httpClientConfig", ",", "Map", "<", "String", ",", "String", ">", "config", ")", "{", "String", "username", "=", "config", ".", "get", "(", "\"client.username\"", ")", ";", "//$NON-NLS-1$", "String", "p...
Update the http client config. @param httpClientConfig @param config
[ "Update", "the", "http", "client", "config", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/DefaultESClientFactory.java#L133-L154
49,055
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.orderPolicies
private void orderPolicies(PoliciesBean policies) { int idx = 1; for (PolicyBean policy : policies.getPolicies()) { policy.setOrderIndex(idx++); } }
java
private void orderPolicies(PoliciesBean policies) { int idx = 1; for (PolicyBean policy : policies.getPolicies()) { policy.setOrderIndex(idx++); } }
[ "private", "void", "orderPolicies", "(", "PoliciesBean", "policies", ")", "{", "int", "idx", "=", "1", ";", "for", "(", "PolicyBean", "policy", ":", "policies", ".", "getPolicies", "(", ")", ")", "{", "policy", ".", "setOrderIndex", "(", "idx", "++", ")"...
Set the order index of all policies. @param policies
[ "Set", "the", "order", "index", "of", "all", "policies", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L394-L399
49,056
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.getEntity
private Map<String, Object> getEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Get.Builder(getIndexName(), id).type(type).build()); if (!response.isSucceeded()) { return null; } return respo...
java
private Map<String, Object> getEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Get.Builder(getIndexName(), id).type(type).build()); if (!response.isSucceeded()) { return null; } return respo...
[ "private", "Map", "<", "String", ",", "Object", ">", "getEntity", "(", "String", "type", ",", "String", "id", ")", "throws", "StorageException", "{", "try", "{", "JestResult", "response", "=", "esClient", ".", "execute", "(", "new", "Get", ".", "Builder", ...
Gets an entity. Callers must unmarshal the resulting map. @param type @param id @throws StorageException
[ "Gets", "an", "entity", ".", "Callers", "must", "unmarshal", "the", "resulting", "map", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2023-L2033
49,057
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.listEntities
private List<Hit<Map<String, Object>, Void>> listEntities(String type, SearchSourceBuilder searchSourceBuilder) throws StorageException { try { String query = searchSourceBuilder.string(); Search search = new Search.Builder(query).addIndex(getIndexName()).addType(type).build(...
java
private List<Hit<Map<String, Object>, Void>> listEntities(String type, SearchSourceBuilder searchSourceBuilder) throws StorageException { try { String query = searchSourceBuilder.string(); Search search = new Search.Builder(query).addIndex(getIndexName()).addType(type).build(...
[ "private", "List", "<", "Hit", "<", "Map", "<", "String", ",", "Object", ">", ",", "Void", ">", ">", "listEntities", "(", "String", "type", ",", "SearchSourceBuilder", "searchSourceBuilder", ")", "throws", "StorageException", "{", "try", "{", "String", "quer...
Returns a list of entities. @param type @param searchSourceBuilder @throws StorageException
[ "Returns", "a", "list", "of", "entities", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2041-L2053
49,058
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.deleteEntity
private void deleteEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Delete.Builder(id).index(getIndexName()).type(type).build()); if (!response.isSucceeded()) { throw new StorageException("Document could not be dele...
java
private void deleteEntity(String type, String id) throws StorageException { try { JestResult response = esClient.execute(new Delete.Builder(id).index(getIndexName()).type(type).build()); if (!response.isSucceeded()) { throw new StorageException("Document could not be dele...
[ "private", "void", "deleteEntity", "(", "String", "type", ",", "String", "id", ")", "throws", "StorageException", "{", "try", "{", "JestResult", "response", "=", "esClient", ".", "execute", "(", "new", "Delete", ".", "Builder", "(", "id", ")", ".", "index"...
Deletes an entity. @param type @param id @throws StorageException
[ "Deletes", "an", "entity", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2061-L2072
49,059
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.updateEntity
private void updateEntity(String type, String id, XContentBuilder source) throws StorageException { try { String doc = source.string(); /* JestResult response = */esClient.execute(new Index.Builder(doc) .setParameter(Parameters.OP_TYPE, "index").index(getIndexName())....
java
private void updateEntity(String type, String id, XContentBuilder source) throws StorageException { try { String doc = source.string(); /* JestResult response = */esClient.execute(new Index.Builder(doc) .setParameter(Parameters.OP_TYPE, "index").index(getIndexName())....
[ "private", "void", "updateEntity", "(", "String", "type", ",", "String", "id", ",", "XContentBuilder", "source", ")", "throws", "StorageException", "{", "try", "{", "String", "doc", "=", "source", ".", "string", "(", ")", ";", "/* JestResult response = */", "e...
Updates a single entity. @param type @param id @param source @throws StorageException
[ "Updates", "a", "single", "entity", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2081-L2089
49,060
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.getPoliciesDocType
private static String getPoliciesDocType(PolicyType type) { String docType = "planPolicies"; //$NON-NLS-1$ if (type == PolicyType.Api) { docType = "apiPolicies"; //$NON-NLS-1$ } else if (type == PolicyType.Client) { docType = "clientPolicies"; //$NON-NLS-1$ } ...
java
private static String getPoliciesDocType(PolicyType type) { String docType = "planPolicies"; //$NON-NLS-1$ if (type == PolicyType.Api) { docType = "apiPolicies"; //$NON-NLS-1$ } else if (type == PolicyType.Client) { docType = "clientPolicies"; //$NON-NLS-1$ } ...
[ "private", "static", "String", "getPoliciesDocType", "(", "PolicyType", "type", ")", "{", "String", "docType", "=", "\"planPolicies\"", ";", "//$NON-NLS-1$", "if", "(", "type", "==", "PolicyType", ".", "Api", ")", "{", "docType", "=", "\"apiPolicies\"", ";", "...
Returns the policies document type to use given the policy type. @param type
[ "Returns", "the", "policies", "document", "type", "to", "use", "given", "the", "policy", "type", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2199-L2207
49,061
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.id
private static String id(String organizationId, String entityId, String version) { return organizationId + ':' + entityId + ':' + version; }
java
private static String id(String organizationId, String entityId, String version) { return organizationId + ':' + entityId + ':' + version; }
[ "private", "static", "String", "id", "(", "String", "organizationId", ",", "String", "entityId", ",", "String", "version", ")", "{", "return", "organizationId", "+", "'", "'", "+", "entityId", "+", "'", "'", "+", "version", ";", "}" ]
A composite ID created from an organization ID, entity ID, and version. @param organizationId @param entityId @param version
[ "A", "composite", "ID", "created", "from", "an", "organization", "ID", "entity", "ID", "and", "version", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2224-L2226
49,062
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.getAll
private <T> Iterator<T> getAll(String entityType, IUnmarshaller<T> unmarshaller) throws StorageException { String query = matchAllQuery(); return getAll(entityType, unmarshaller, query); }
java
private <T> Iterator<T> getAll(String entityType, IUnmarshaller<T> unmarshaller) throws StorageException { String query = matchAllQuery(); return getAll(entityType, unmarshaller, query); }
[ "private", "<", "T", ">", "Iterator", "<", "T", ">", "getAll", "(", "String", "entityType", ",", "IUnmarshaller", "<", "T", ">", "unmarshaller", ")", "throws", "StorageException", "{", "String", "query", "=", "matchAllQuery", "(", ")", ";", "return", "getA...
Returns an iterator over all instances of the given entity type. @param entityType @param unmarshaller @throws StorageException
[ "Returns", "an", "iterator", "over", "all", "instances", "of", "the", "given", "entity", "type", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2564-L2567
49,063
apiman/apiman
common/servlet/src/main/java/io/apiman/common/servlet/ApimanCorsFilter.java
ApimanCorsFilter.hasOriginHeader
private boolean hasOriginHeader(HttpServletRequest httpReq) { String origin = httpReq.getHeader("Origin"); //$NON-NLS-1$ return origin != null && origin.trim().length() > 0; }
java
private boolean hasOriginHeader(HttpServletRequest httpReq) { String origin = httpReq.getHeader("Origin"); //$NON-NLS-1$ return origin != null && origin.trim().length() > 0; }
[ "private", "boolean", "hasOriginHeader", "(", "HttpServletRequest", "httpReq", ")", "{", "String", "origin", "=", "httpReq", ".", "getHeader", "(", "\"Origin\"", ")", ";", "//$NON-NLS-1$", "return", "origin", "!=", "null", "&&", "origin", ".", "trim", "(", ")"...
Returns true if the Origin request header is present. @param httpReq the http servlet request @return true if has origin header, else false
[ "Returns", "true", "if", "the", "Origin", "request", "header", "is", "present", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/servlet/src/main/java/io/apiman/common/servlet/ApimanCorsFilter.java#L98-L101
49,064
apiman/apiman
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/api/auth/AuthFactory.java
AuthFactory.getAuth
public static AuthHandler getAuth(Vertx vertx, Router router, VertxEngineConfig apimanConfig) { String type = apimanConfig.getAuth().getString("type", "NONE"); JsonObject authConfig = apimanConfig.getAuth().getJsonObject("config", new JsonObject()); switch(AuthType.getType(type)) { case...
java
public static AuthHandler getAuth(Vertx vertx, Router router, VertxEngineConfig apimanConfig) { String type = apimanConfig.getAuth().getString("type", "NONE"); JsonObject authConfig = apimanConfig.getAuth().getJsonObject("config", new JsonObject()); switch(AuthType.getType(type)) { case...
[ "public", "static", "AuthHandler", "getAuth", "(", "Vertx", "vertx", ",", "Router", "router", ",", "VertxEngineConfig", "apimanConfig", ")", "{", "String", "type", "=", "apimanConfig", ".", "getAuth", "(", ")", ".", "getString", "(", "\"type\"", ",", "\"NONE\"...
Creates an auth handler of the type indicated in the `auth` section of config. @param vertx the vert.x instance @param router the vert.x web router to protect @param apimanConfig the apiman config @return an auth handler
[ "Creates", "an", "auth", "handler", "of", "the", "type", "indicated", "in", "the", "auth", "section", "of", "config", "." ]
8c049c2a2f2e4a69bbb6125686a15edd26f29c21
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/api/auth/AuthFactory.java#L54-L68
49,065
OpenVidu/openvidu
openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java
OpenVidu.createSession
public Session createSession() throws OpenViduJavaClientException, OpenViduHttpException { Session s = new Session(); OpenVidu.activeSessions.put(s.getSessionId(), s); return s; }
java
public Session createSession() throws OpenViduJavaClientException, OpenViduHttpException { Session s = new Session(); OpenVidu.activeSessions.put(s.getSessionId(), s); return s; }
[ "public", "Session", "createSession", "(", ")", "throws", "OpenViduJavaClientException", ",", "OpenViduHttpException", "{", "Session", "s", "=", "new", "Session", "(", ")", ";", "OpenVidu", ".", "activeSessions", ".", "put", "(", "s", ".", "getSessionId", "(", ...
Creates an OpenVidu session with the default settings @return The created session @throws OpenViduJavaClientException @throws OpenViduHttpException
[ "Creates", "an", "OpenVidu", "session", "with", "the", "default", "settings" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java#L128-L132
49,066
OpenVidu/openvidu
openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java
OpenVidu.getRecording
public Recording getRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS + "/" + recordingId); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e) {...
java
public Recording getRecording(String recordingId) throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS + "/" + recordingId); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e) {...
[ "public", "Recording", "getRecording", "(", "String", "recordingId", ")", "throws", "OpenViduJavaClientException", ",", "OpenViduHttpException", "{", "HttpGet", "request", "=", "new", "HttpGet", "(", "OpenVidu", ".", "urlOpenViduServer", "+", "API_RECORDINGS", "+", "\...
Gets an existing recording @param recordingId The id property of the recording you want to retrieve @throws OpenViduJavaClientException @throws OpenViduHttpException Value returned from {@link io.openvidu.java.client.OpenViduHttpException#getStatus()} <ul> <li><code>404</code>: no recording exists for the passe...
[ "Gets", "an", "existing", "recording" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java#L395-L414
49,067
OpenVidu/openvidu
openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java
OpenVidu.listRecordings
@SuppressWarnings("unchecked") public List<Recording> listRecordings() throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e)...
java
@SuppressWarnings("unchecked") public List<Recording> listRecordings() throws OpenViduJavaClientException, OpenViduHttpException { HttpGet request = new HttpGet(OpenVidu.urlOpenViduServer + API_RECORDINGS); HttpResponse response; try { response = OpenVidu.httpClient.execute(request); } catch (IOException e)...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "Recording", ">", "listRecordings", "(", ")", "throws", "OpenViduJavaClientException", ",", "OpenViduHttpException", "{", "HttpGet", "request", "=", "new", "HttpGet", "(", "OpenVidu", ".", ...
Lists all existing recordings @return A {@link java.util.List} with all existing recordings @throws OpenViduJavaClientException @throws OpenViduHttpException
[ "Lists", "all", "existing", "recordings" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-java-client/src/main/java/io/openvidu/java/client/OpenVidu.java#L424-L450
49,068
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java
KurentoSessionManager.createSession
public void createSession(Session sessionNotActive, KurentoClientSessionInfo kcSessionInfo) throws OpenViduException { String sessionId = kcSessionInfo.getRoomName(); KurentoSession session = (KurentoSession) sessions.get(sessionId); if (session != null) { throw new OpenViduException(Code.ROOM_CANNOT_BE_CRE...
java
public void createSession(Session sessionNotActive, KurentoClientSessionInfo kcSessionInfo) throws OpenViduException { String sessionId = kcSessionInfo.getRoomName(); KurentoSession session = (KurentoSession) sessions.get(sessionId); if (session != null) { throw new OpenViduException(Code.ROOM_CANNOT_BE_CRE...
[ "public", "void", "createSession", "(", "Session", "sessionNotActive", ",", "KurentoClientSessionInfo", "kcSessionInfo", ")", "throws", "OpenViduException", "{", "String", "sessionId", "=", "kcSessionInfo", ".", "getRoomName", "(", ")", ";", "KurentoSession", "session",...
Creates a session if it doesn't already exist. The session's id will be indicated by the session info bean. @param kcSessionInfo bean that will be passed to the {@link KurentoClientProvider} in order to obtain the {@link KurentoClient} that will be used by the room @throws OpenViduException in case of error while crea...
[ "Creates", "a", "session", "if", "it", "doesn", "t", "already", "exist", ".", "The", "session", "s", "id", "will", "be", "indicated", "by", "the", "session", "info", "bean", "." ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java#L503-L527
49,069
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java
MediaEndpoint.unregisterElementErrListener
protected void unregisterElementErrListener(MediaElement element, final ListenerSubscription subscription) { if (element == null || subscription == null) { return; } element.removeErrorListener(subscription); }
java
protected void unregisterElementErrListener(MediaElement element, final ListenerSubscription subscription) { if (element == null || subscription == null) { return; } element.removeErrorListener(subscription); }
[ "protected", "void", "unregisterElementErrListener", "(", "MediaElement", "element", ",", "final", "ListenerSubscription", "subscription", ")", "{", "if", "(", "element", "==", "null", "||", "subscription", "==", "null", ")", "{", "return", ";", "}", "element", ...
Unregisters the error listener from the media element using the provided subscription. @param element the {@link MediaElement} @param subscription the associated {@link ListenerSubscription}
[ "Unregisters", "the", "error", "listener", "from", "the", "media", "element", "using", "the", "provided", "subscription", "." ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java#L335-L340
49,070
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java
SessionManager.getParticipants
public Set<Participant> getParticipants(String sessionId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Set<Participant> participants = session.getParticipant...
java
public Set<Participant> getParticipants(String sessionId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Set<Participant> participants = session.getParticipant...
[ "public", "Set", "<", "Participant", ">", "getParticipants", "(", "String", "sessionId", ")", "throws", "OpenViduException", "{", "Session", "session", "=", "sessions", ".", "get", "(", "sessionId", ")", ";", "if", "(", "session", "==", "null", ")", "{", "...
Returns all the participants inside a session. @param sessionId identifier of the session @return set of {@link Participant} @throws OpenViduException in case the session doesn't exist
[ "Returns", "all", "the", "participants", "inside", "a", "session", "." ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java#L169-L177
49,071
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java
SessionManager.getParticipant
public Participant getParticipant(String sessionId, String participantPrivateId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Participant participant = sessi...
java
public Participant getParticipant(String sessionId, String participantPrivateId) throws OpenViduException { Session session = sessions.get(sessionId); if (session == null) { throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "Session '" + sessionId + "' not found"); } Participant participant = sessi...
[ "public", "Participant", "getParticipant", "(", "String", "sessionId", ",", "String", "participantPrivateId", ")", "throws", "OpenViduException", "{", "Session", "session", "=", "sessions", ".", "get", "(", "sessionId", ")", ";", "if", "(", "session", "==", "nul...
Returns a participant in a session @param sessionId identifier of the session @param participantPrivateId private identifier of the participant @return {@link Participant} @throws OpenViduException in case the session doesn't exist or the participant doesn't belong to it
[ "Returns", "a", "participant", "in", "a", "session" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java#L188-L199
49,072
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java
SessionManager.getParticipant
public Participant getParticipant(String participantPrivateId) throws OpenViduException { for (Session session : sessions.values()) { if (!session.isClosed()) { if (session.getParticipantByPrivateId(participantPrivateId) != null) { return session.getParticipantByPrivateId(participantPrivateId); } }...
java
public Participant getParticipant(String participantPrivateId) throws OpenViduException { for (Session session : sessions.values()) { if (!session.isClosed()) { if (session.getParticipantByPrivateId(participantPrivateId) != null) { return session.getParticipantByPrivateId(participantPrivateId); } }...
[ "public", "Participant", "getParticipant", "(", "String", "participantPrivateId", ")", "throws", "OpenViduException", "{", "for", "(", "Session", "session", ":", "sessions", ".", "values", "(", ")", ")", "{", "if", "(", "!", "session", ".", "isClosed", "(", ...
Returns a participant @param participantPrivateId private identifier of the participant @return {@link Participant} @throws OpenViduException in case the participant doesn't exist
[ "Returns", "a", "participant" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/core/SessionManager.java#L208-L218
49,073
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java
RecordingService.updateRecordingManagerCollections
protected void updateRecordingManagerCollections(Session session, Recording recording) { this.recordingManager.sessionHandler.setRecordingStarted(session.getSessionId(), recording); this.recordingManager.sessionsRecordings.put(session.getSessionId(), recording); this.recordingManager.startingRecordings.remove(rec...
java
protected void updateRecordingManagerCollections(Session session, Recording recording) { this.recordingManager.sessionHandler.setRecordingStarted(session.getSessionId(), recording); this.recordingManager.sessionsRecordings.put(session.getSessionId(), recording); this.recordingManager.startingRecordings.remove(rec...
[ "protected", "void", "updateRecordingManagerCollections", "(", "Session", "session", ",", "Recording", "recording", ")", "{", "this", ".", "recordingManager", ".", "sessionHandler", ".", "setRecordingStarted", "(", "session", ".", "getSessionId", "(", ")", ",", "rec...
Changes recording from starting to started, updates global recording collections and sends RPC response to clients
[ "Changes", "recording", "from", "starting", "to", "started", "updates", "global", "recording", "collections", "and", "sends", "RPC", "response", "to", "clients" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java#L101-L106
49,074
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java
RecordingService.sendRecordingStartedNotification
protected void sendRecordingStartedNotification(Session session, Recording recording) { this.recordingManager.getSessionEventsHandler().sendRecordingStartedNotification(session, recording); }
java
protected void sendRecordingStartedNotification(Session session, Recording recording) { this.recordingManager.getSessionEventsHandler().sendRecordingStartedNotification(session, recording); }
[ "protected", "void", "sendRecordingStartedNotification", "(", "Session", "session", ",", "Recording", "recording", ")", "{", "this", ".", "recordingManager", ".", "getSessionEventsHandler", "(", ")", ".", "sendRecordingStartedNotification", "(", "session", ",", "recordi...
Sends RPC response for recording started event
[ "Sends", "RPC", "response", "for", "recording", "started", "event" ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java#L111-L113
49,075
OpenVidu/openvidu
openvidu-client/src/main/java/io/openvidu/client/ServerJsonRpcHandler.java
ServerJsonRpcHandler.getNotification
public Notification getNotification() { try { Notification notif = notifications.take(); log.debug("Dequeued notification {}", notif); return notif; } catch (InterruptedException e) { log.info("Interrupted while polling notifications' queue"); return null; } }
java
public Notification getNotification() { try { Notification notif = notifications.take(); log.debug("Dequeued notification {}", notif); return notif; } catch (InterruptedException e) { log.info("Interrupted while polling notifications' queue"); return null; } }
[ "public", "Notification", "getNotification", "(", ")", "{", "try", "{", "Notification", "notif", "=", "notifications", ".", "take", "(", ")", ";", "log", ".", "debug", "(", "\"Dequeued notification {}\"", ",", "notif", ")", ";", "return", "notif", ";", "}", ...
Blocks until an element is available and then returns it by removing it from the queue. @return a {@link Notification} from the queue, null when interrupted @see BlockingQueue#take()
[ "Blocks", "until", "an", "element", "is", "available", "and", "then", "returns", "it", "by", "removing", "it", "from", "the", "queue", "." ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-client/src/main/java/io/openvidu/client/ServerJsonRpcHandler.java#L212-L221
49,076
watson-developer-cloud/java-sdk
assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
Assistant.createSession
public ServiceCall<SessionResponse> createSession(CreateSessionOptions createSessionOptions) { Validator.notNull(createSessionOptions, "createSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { createSessionOptions.assistantId() }; Reques...
java
public ServiceCall<SessionResponse> createSession(CreateSessionOptions createSessionOptions) { Validator.notNull(createSessionOptions, "createSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { createSessionOptions.assistantId() }; Reques...
[ "public", "ServiceCall", "<", "SessionResponse", ">", "createSession", "(", "CreateSessionOptions", "createSessionOptions", ")", "{", "Validator", ".", "notNull", "(", "createSessionOptions", ",", "\"createSessionOptions cannot be null\"", ")", ";", "String", "[", "]", ...
Create a session. Create a new session. A session is used to send user input to a skill and receive responses. It also maintains the state of the conversation. @param createSessionOptions the {@link CreateSessionOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link ...
[ "Create", "a", "session", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java#L101-L114
49,077
watson-developer-cloud/java-sdk
assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
Assistant.deleteSession
public ServiceCall<Void> deleteSession(DeleteSessionOptions deleteSessionOptions) { Validator.notNull(deleteSessionOptions, "deleteSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { deleteSessionOptions.assistantId(), deleteSessionOptions.se...
java
public ServiceCall<Void> deleteSession(DeleteSessionOptions deleteSessionOptions) { Validator.notNull(deleteSessionOptions, "deleteSessionOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions" }; String[] pathParameters = { deleteSessionOptions.assistantId(), deleteSessionOptions.se...
[ "public", "ServiceCall", "<", "Void", ">", "deleteSession", "(", "DeleteSessionOptions", "deleteSessionOptions", ")", "{", "Validator", ".", "notNull", "(", "deleteSessionOptions", ",", "\"deleteSessionOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegmen...
Delete session. Deletes a session explicitly before it times out. @param deleteSessionOptions the {@link DeleteSessionOptions} containing the options for the call @return a {@link ServiceCall} with a response type of Void
[ "Delete", "session", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java#L124-L137
49,078
watson-developer-cloud/java-sdk
assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java
Assistant.message
public ServiceCall<MessageResponse> message(MessageOptions messageOptions) { Validator.notNull(messageOptions, "messageOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions", "message" }; String[] pathParameters = { messageOptions.assistantId(), messageOptions.sessionId() }; Req...
java
public ServiceCall<MessageResponse> message(MessageOptions messageOptions) { Validator.notNull(messageOptions, "messageOptions cannot be null"); String[] pathSegments = { "v2/assistants", "sessions", "message" }; String[] pathParameters = { messageOptions.assistantId(), messageOptions.sessionId() }; Req...
[ "public", "ServiceCall", "<", "MessageResponse", ">", "message", "(", "MessageOptions", "messageOptions", ")", "{", "Validator", ".", "notNull", "(", "messageOptions", ",", "\"messageOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "=", "{", ...
Send user input to assistant. Send user input to an assistant and receive a response. There is no rate limit for this operation. @param messageOptions the {@link MessageOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link MessageResponse}
[ "Send", "user", "input", "to", "assistant", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java#L149-L170
49,079
watson-developer-cloud/java-sdk
language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java
LanguageTranslator.identify
public ServiceCall<IdentifiedLanguages> identify(IdentifyOptions identifyOptions) { Validator.notNull(identifyOptions, "identifyOptions cannot be null"); String[] pathSegments = { "v3/identify" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
java
public ServiceCall<IdentifiedLanguages> identify(IdentifyOptions identifyOptions) { Validator.notNull(identifyOptions, "identifyOptions cannot be null"); String[] pathSegments = { "v3/identify" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
[ "public", "ServiceCall", "<", "IdentifiedLanguages", ">", "identify", "(", "IdentifyOptions", "identifyOptions", ")", "{", "Validator", ".", "notNull", "(", "identifyOptions", ",", "\"identifyOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "="...
Identify language. Identifies the language of the input text. @param identifyOptions the {@link IdentifyOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link IdentifiedLanguages}
[ "Identify", "language", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java#L145-L157
49,080
watson-developer-cloud/java-sdk
language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java
LanguageTranslator.listIdentifiableLanguages
public ServiceCall<IdentifiableLanguages> listIdentifiableLanguages( ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions) { String[] pathSegments = { "v3/identifiable_languages" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
java
public ServiceCall<IdentifiableLanguages> listIdentifiableLanguages( ListIdentifiableLanguagesOptions listIdentifiableLanguagesOptions) { String[] pathSegments = { "v3/identifiable_languages" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); ...
[ "public", "ServiceCall", "<", "IdentifiableLanguages", ">", "listIdentifiableLanguages", "(", "ListIdentifiableLanguagesOptions", "listIdentifiableLanguagesOptions", ")", "{", "String", "[", "]", "pathSegments", "=", "{", "\"v3/identifiable_languages\"", "}", ";", "RequestBui...
List identifiable languages. Lists the languages that the service can identify. Returns the language code (for example, `en` for English or `es` for Spanish) and name of each language. @param listIdentifiableLanguagesOptions the {@link ListIdentifiableLanguagesOptions} containing the options for the call @return a {@...
[ "List", "identifiable", "languages", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java#L169-L182
49,081
watson-developer-cloud/java-sdk
language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java
LanguageTranslator.createModel
public ServiceCall<TranslationModel> createModel(CreateModelOptions createModelOptions) { Validator.notNull(createModelOptions, "createModelOptions cannot be null"); Validator.isTrue((createModelOptions.forcedGlossary() != null) || (createModelOptions.parallelCorpus() != null), "At least one of forcedGl...
java
public ServiceCall<TranslationModel> createModel(CreateModelOptions createModelOptions) { Validator.notNull(createModelOptions, "createModelOptions cannot be null"); Validator.isTrue((createModelOptions.forcedGlossary() != null) || (createModelOptions.parallelCorpus() != null), "At least one of forcedGl...
[ "public", "ServiceCall", "<", "TranslationModel", ">", "createModel", "(", "CreateModelOptions", "createModelOptions", ")", "{", "Validator", ".", "notNull", "(", "createModelOptions", ",", "\"createModelOptions cannot be null\"", ")", ";", "Validator", ".", "isTrue", "...
Create model. Uploads Translation Memory eXchange (TMX) files to customize a translation model. You can either customize a model with a forced glossary or with a corpus that contains parallel sentences. To create a model that is customized with a parallel corpus <b>and</b> a forced glossary, proceed in two steps: cus...
[ "Create", "model", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/language-translator/src/main/java/com/ibm/watson/language_translator/v3/LanguageTranslator.java#L215-L245
49,082
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.convertToHtml
public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions) { Validator.notNull(convertToHtmlOptions, "convertToHtmlOptions cannot be null"); String[] pathSegments = { "v1/html_conversion" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint...
java
public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions) { Validator.notNull(convertToHtmlOptions, "convertToHtmlOptions cannot be null"); String[] pathSegments = { "v1/html_conversion" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint...
[ "public", "ServiceCall", "<", "HTMLReturn", ">", "convertToHtml", "(", "ConvertToHtmlOptions", "convertToHtmlOptions", ")", "{", "Validator", ".", "notNull", "(", "convertToHtmlOptions", ",", "\"convertToHtmlOptions cannot be null\"", ")", ";", "String", "[", "]", "path...
Convert document to HTML. Converts a document to HTML. @param convertToHtmlOptions the {@link ConvertToHtmlOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link HTMLReturn}
[ "Convert", "document", "to", "HTML", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L106-L126
49,083
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.compareDocuments
public ServiceCall<CompareReturn> compareDocuments(CompareDocumentsOptions compareDocumentsOptions) { Validator.notNull(compareDocumentsOptions, "compareDocumentsOptions cannot be null"); String[] pathSegments = { "v1/comparison" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUr...
java
public ServiceCall<CompareReturn> compareDocuments(CompareDocumentsOptions compareDocumentsOptions) { Validator.notNull(compareDocumentsOptions, "compareDocumentsOptions cannot be null"); String[] pathSegments = { "v1/comparison" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUr...
[ "public", "ServiceCall", "<", "CompareReturn", ">", "compareDocuments", "(", "CompareDocumentsOptions", "compareDocumentsOptions", ")", "{", "Validator", ".", "notNull", "(", "compareDocumentsOptions", ",", "\"compareDocumentsOptions cannot be null\"", ")", ";", "String", "...
Compare two documents. Compares two input documents. Documents must be in the same format. @param compareDocumentsOptions the {@link CompareDocumentsOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link CompareReturn}
[ "Compare", "two", "documents", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L196-L225
49,084
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.addFeedback
public ServiceCall<FeedbackReturn> addFeedback(AddFeedbackOptions addFeedbackOptions) { Validator.notNull(addFeedbackOptions, "addFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegme...
java
public ServiceCall<FeedbackReturn> addFeedback(AddFeedbackOptions addFeedbackOptions) { Validator.notNull(addFeedbackOptions, "addFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegme...
[ "public", "ServiceCall", "<", "FeedbackReturn", ">", "addFeedback", "(", "AddFeedbackOptions", "addFeedbackOptions", ")", "{", "Validator", ".", "notNull", "(", "addFeedbackOptions", ",", "\"addFeedbackOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegmen...
Add feedback. Adds feedback in the form of _labels_ from a subject-matter expert (SME) to a governing document. **Important:** Feedback is not immediately incorporated into the training model, nor is it guaranteed to be incorporated at a later date. Instead, submitted feedback is used to suggest future updates to the ...
[ "Add", "feedback", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L237-L257
49,085
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.deleteFeedback
public ServiceCall<Void> deleteFeedback(DeleteFeedbackOptions deleteFeedbackOptions) { Validator.notNull(deleteFeedbackOptions, "deleteFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { deleteFeedbackOptions.feedbackId() }; RequestBuilder builder = R...
java
public ServiceCall<Void> deleteFeedback(DeleteFeedbackOptions deleteFeedbackOptions) { Validator.notNull(deleteFeedbackOptions, "deleteFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { deleteFeedbackOptions.feedbackId() }; RequestBuilder builder = R...
[ "public", "ServiceCall", "<", "Void", ">", "deleteFeedback", "(", "DeleteFeedbackOptions", "deleteFeedbackOptions", ")", "{", "Validator", ".", "notNull", "(", "deleteFeedbackOptions", ",", "\"deleteFeedbackOptions cannot be null\"", ")", ";", "String", "[", "]", "pathS...
Delete a specified feedback entry. Deletes a feedback entry with a specified `feedback_id`. @param deleteFeedbackOptions the {@link DeleteFeedbackOptions} containing the options for the call @return a {@link ServiceCall} with a response type of Void
[ "Delete", "a", "specified", "feedback", "entry", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L267-L283
49,086
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.getFeedback
public ServiceCall<GetFeedback> getFeedback(GetFeedbackOptions getFeedbackOptions) { Validator.notNull(getFeedbackOptions, "getFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { getFeedbackOptions.feedbackId() }; RequestBuilder builder = RequestBuild...
java
public ServiceCall<GetFeedback> getFeedback(GetFeedbackOptions getFeedbackOptions) { Validator.notNull(getFeedbackOptions, "getFeedbackOptions cannot be null"); String[] pathSegments = { "v1/feedback" }; String[] pathParameters = { getFeedbackOptions.feedbackId() }; RequestBuilder builder = RequestBuild...
[ "public", "ServiceCall", "<", "GetFeedback", ">", "getFeedback", "(", "GetFeedbackOptions", "getFeedbackOptions", ")", "{", "Validator", ".", "notNull", "(", "getFeedbackOptions", ",", "\"getFeedbackOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments"...
List a specified feedback entry. Lists a feedback entry with a specified `feedback_id`. @param getFeedbackOptions the {@link GetFeedbackOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link GetFeedback}
[ "List", "a", "specified", "feedback", "entry", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L293-L309
49,087
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.createBatch
public ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOptions) { Validator.notNull(createBatchOptions, "createBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)...
java
public ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOptions) { Validator.notNull(createBatchOptions, "createBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)...
[ "public", "ServiceCall", "<", "BatchStatus", ">", "createBatch", "(", "CreateBatchOptions", "createBatchOptions", ")", "{", "Validator", ".", "notNull", "(", "createBatchOptions", ",", "\"createBatchOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments"...
Submit a batch-processing request. Run Compare and Comply methods over a collection of input documents. **Important:** Batch processing requires the use of the [IBM Cloud Object Storage service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage). The use of IBM Clou...
[ "Submit", "a", "batch", "-", "processing", "request", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L404-L432
49,088
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.getBatch
public ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions) { Validator.notNull(getBatchOptions, "getBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { getBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder....
java
public ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions) { Validator.notNull(getBatchOptions, "getBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { getBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder....
[ "public", "ServiceCall", "<", "BatchStatus", ">", "getBatch", "(", "GetBatchOptions", "getBatchOptions", ")", "{", "Validator", ".", "notNull", "(", "getBatchOptions", ",", "\"getBatchOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "=", "{",...
Get information about a specific batch-processing job. Gets information about a batch-processing job with a specified ID. @param getBatchOptions the {@link GetBatchOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link BatchStatus}
[ "Get", "information", "about", "a", "specific", "batch", "-", "processing", "job", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L442-L455
49,089
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.listBatches
public ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions) { String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("version", versionDate); Map<String, String> sdkHeaders = Sd...
java
public ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions) { String[] pathSegments = { "v1/batches" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); builder.query("version", versionDate); Map<String, String> sdkHeaders = Sd...
[ "public", "ServiceCall", "<", "Batches", ">", "listBatches", "(", "ListBatchesOptions", "listBatchesOptions", ")", "{", "String", "[", "]", "pathSegments", "=", "{", "\"v1/batches\"", "}", ";", "RequestBuilder", "builder", "=", "RequestBuilder", ".", "get", "(", ...
List submitted batch-processing jobs. Lists batch-processing jobs submitted by users. @param listBatchesOptions the {@link ListBatchesOptions} containing the options for the call @return a {@link ServiceCall} with a response type of {@link Batches}
[ "List", "submitted", "batch", "-", "processing", "jobs", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L465-L477
49,090
watson-developer-cloud/java-sdk
compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
CompareComply.updateBatch
public ServiceCall<BatchStatus> updateBatch(UpdateBatchOptions updateBatchOptions) { Validator.notNull(updateBatchOptions, "updateBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { updateBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.p...
java
public ServiceCall<BatchStatus> updateBatch(UpdateBatchOptions updateBatchOptions) { Validator.notNull(updateBatchOptions, "updateBatchOptions cannot be null"); String[] pathSegments = { "v1/batches" }; String[] pathParameters = { updateBatchOptions.batchId() }; RequestBuilder builder = RequestBuilder.p...
[ "public", "ServiceCall", "<", "BatchStatus", ">", "updateBatch", "(", "UpdateBatchOptions", "updateBatchOptions", ")", "{", "Validator", ".", "notNull", "(", "updateBatchOptions", ",", "\"updateBatchOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments"...
Update a pending or active batch-processing job. Updates a pending or active batch-processing job. You can rescan the input bucket to check for new documents or cancel a job. @param updateBatchOptions the {@link UpdateBatchOptions} containing the options for the call @return a {@link ServiceCall} with a response type...
[ "Update", "a", "pending", "or", "active", "batch", "-", "processing", "job", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java#L499-L516
49,091
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.getVoice
public ServiceCall<Voice> getVoice(GetVoiceOptions getVoiceOptions) { Validator.notNull(getVoiceOptions, "getVoiceOptions cannot be null"); String[] pathSegments = { "v1/voices" }; String[] pathParameters = { getVoiceOptions.voice() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.construct...
java
public ServiceCall<Voice> getVoice(GetVoiceOptions getVoiceOptions) { Validator.notNull(getVoiceOptions, "getVoiceOptions cannot be null"); String[] pathSegments = { "v1/voices" }; String[] pathParameters = { getVoiceOptions.voice() }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.construct...
[ "public", "ServiceCall", "<", "Voice", ">", "getVoice", "(", "GetVoiceOptions", "getVoiceOptions", ")", "{", "Validator", ".", "notNull", "(", "getVoiceOptions", ",", "\"getVoiceOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "=", "{", "\"...
Get a voice. Gets information about the specified voice. The information includes the name, language, gender, and other details about the voice. Specify a customization ID to obtain information for that custom voice model of the specified voice. To list information about all available voices, use the **List voices** m...
[ "Get", "a", "voice", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L130-L145
49,092
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.listVoices
public ServiceCall<Voices> listVoices(ListVoicesOptions listVoicesOptions) { String[] pathSegments = { "v1/voices" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("text_to_speech", "v1", "l...
java
public ServiceCall<Voices> listVoices(ListVoicesOptions listVoicesOptions) { String[] pathSegments = { "v1/voices" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("text_to_speech", "v1", "l...
[ "public", "ServiceCall", "<", "Voices", ">", "listVoices", "(", "ListVoicesOptions", "listVoicesOptions", ")", "{", "String", "[", "]", "pathSegments", "=", "{", "\"v1/voices\"", "}", ";", "RequestBuilder", "builder", "=", "RequestBuilder", ".", "get", "(", "Req...
List voices. Lists all voices available for use with the service. The information includes the name, language, gender, and other details about the voice. To see information about a specific voice, use the **Get a voice** method. **See also:** [Listing all available voices](https://cloud.ibm.com/docs/services/text-to-...
[ "List", "voices", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L159-L170
49,093
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.synthesize
public ServiceCall<InputStream> synthesize(SynthesizeOptions synthesizeOptions) { Validator.notNull(synthesizeOptions, "synthesizeOptions cannot be null"); String[] pathSegments = { "v1/synthesize" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));...
java
public ServiceCall<InputStream> synthesize(SynthesizeOptions synthesizeOptions) { Validator.notNull(synthesizeOptions, "synthesizeOptions cannot be null"); String[] pathSegments = { "v1/synthesize" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));...
[ "public", "ServiceCall", "<", "InputStream", ">", "synthesize", "(", "SynthesizeOptions", "synthesizeOptions", ")", "{", "Validator", ".", "notNull", "(", "synthesizeOptions", ",", "\"synthesizeOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "...
Synthesize audio. Synthesizes text to audio that is spoken in the specified voice. The service bases its understanding of the language for the input text on the specified voice. Use a voice that matches the language of the input text. The method accepts a maximum of 5 KB of input text in the body of the request, and ...
[ "Synthesize", "audio", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L266-L287
49,094
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.getPronunciation
public ServiceCall<Pronunciation> getPronunciation(GetPronunciationOptions getPronunciationOptions) { Validator.notNull(getPronunciationOptions, "getPronunciationOptions cannot be null"); String[] pathSegments = { "v1/pronunciation" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttp...
java
public ServiceCall<Pronunciation> getPronunciation(GetPronunciationOptions getPronunciationOptions) { Validator.notNull(getPronunciationOptions, "getPronunciationOptions cannot be null"); String[] pathSegments = { "v1/pronunciation" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttp...
[ "public", "ServiceCall", "<", "Pronunciation", ">", "getPronunciation", "(", "GetPronunciationOptions", "getPronunciationOptions", ")", "{", "Validator", ".", "notNull", "(", "getPronunciationOptions", ",", "\"getPronunciationOptions cannot be null\"", ")", ";", "String", "...
Get pronunciation. Gets the phonetic pronunciation for the specified word. You can request the pronunciation for a specific format. You can also request the pronunciation for a specific voice to see the default translation for the language of that voice or for a specific custom voice model to see the translation for t...
[ "Get", "pronunciation", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L327-L347
49,095
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.createVoiceModel
public ServiceCall<VoiceModel> createVoiceModel(CreateVoiceModelOptions createVoiceModelOptions) { Validator.notNull(createVoiceModelOptions, "createVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpU...
java
public ServiceCall<VoiceModel> createVoiceModel(CreateVoiceModelOptions createVoiceModelOptions) { Validator.notNull(createVoiceModelOptions, "createVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpU...
[ "public", "ServiceCall", "<", "VoiceModel", ">", "createVoiceModel", "(", "CreateVoiceModelOptions", "createVoiceModelOptions", ")", "{", "Validator", ".", "notNull", "(", "createVoiceModelOptions", ",", "\"createVoiceModelOptions cannot be null\"", ")", ";", "String", "[",...
Create a custom model. Creates a new empty custom voice model. You must specify a name for the new custom model. You can optionally specify the language and a description for the new model. The model is owned by the instance of the service whose credentials are used to create it. **Note:** This method is currently a ...
[ "Create", "a", "custom", "model", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L364-L383
49,096
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.getVoiceModel
public ServiceCall<VoiceModel> getVoiceModel(GetVoiceModelOptions getVoiceModelOptions) { Validator.notNull(getVoiceModelOptions, "getVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { getVoiceModelOptions.customizationId() }; RequestBuilder ...
java
public ServiceCall<VoiceModel> getVoiceModel(GetVoiceModelOptions getVoiceModelOptions) { Validator.notNull(getVoiceModelOptions, "getVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { getVoiceModelOptions.customizationId() }; RequestBuilder ...
[ "public", "ServiceCall", "<", "VoiceModel", ">", "getVoiceModel", "(", "GetVoiceModelOptions", "getVoiceModelOptions", ")", "{", "Validator", ".", "notNull", "(", "getVoiceModelOptions", ",", "\"getVoiceModelOptions cannot be null\"", ")", ";", "String", "[", "]", "path...
Get a custom model. Gets all information about a specified custom voice model. In addition to metadata such as the name and description of the voice model, the output includes the words and their translations as defined in the model. To see just the metadata for a voice model, use the **List custom models** method. *...
[ "Get", "a", "custom", "model", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L427-L439
49,097
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.listVoiceModels
public ServiceCall<VoiceModels> listVoiceModels(ListVoiceModelsOptions listVoiceModelsOptions) { String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeader...
java
public ServiceCall<VoiceModels> listVoiceModels(ListVoiceModelsOptions listVoiceModelsOptions) { String[] pathSegments = { "v1/customizations" }; RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments)); Map<String, String> sdkHeaders = SdkCommon.getSdkHeader...
[ "public", "ServiceCall", "<", "VoiceModels", ">", "listVoiceModels", "(", "ListVoiceModelsOptions", "listVoiceModelsOptions", ")", "{", "String", "[", "]", "pathSegments", "=", "{", "\"v1/customizations\"", "}", ";", "RequestBuilder", "builder", "=", "RequestBuilder", ...
List custom models. Lists metadata such as the name and description for all custom voice models that are owned by an instance of the service. Specify a language to list the voice models for that language only. To see the words in addition to the metadata for a specific voice model, use the **List a custom model** meth...
[ "List", "custom", "models", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L457-L471
49,098
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.updateVoiceModel
public ServiceCall<Void> updateVoiceModel(UpdateVoiceModelOptions updateVoiceModelOptions) { Validator.notNull(updateVoiceModelOptions, "updateVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { updateVoiceModelOptions.customizationId() }; Req...
java
public ServiceCall<Void> updateVoiceModel(UpdateVoiceModelOptions updateVoiceModelOptions) { Validator.notNull(updateVoiceModelOptions, "updateVoiceModelOptions cannot be null"); String[] pathSegments = { "v1/customizations" }; String[] pathParameters = { updateVoiceModelOptions.customizationId() }; Req...
[ "public", "ServiceCall", "<", "Void", ">", "updateVoiceModel", "(", "UpdateVoiceModelOptions", "updateVoiceModelOptions", ")", "{", "Validator", ".", "notNull", "(", "updateVoiceModelOptions", ",", "\"updateVoiceModelOptions cannot be null\"", ")", ";", "String", "[", "]"...
Update a custom model. Updates information for the specified custom voice model. You can update metadata such as the name and description of the voice model. You can also update the words in the model and their translations. Adding a new translation for a word that already exists in a custom model overwrites the word'...
[ "Update", "a", "custom", "model", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L522-L545
49,099
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java
TextToSpeech.addWords
public ServiceCall<Void> addWords(AddWordsOptions addWordsOptions) { Validator.notNull(addWordsOptions, "addWordsOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { addWordsOptions.customizationId() }; RequestBuilder builder = RequestBuilder.po...
java
public ServiceCall<Void> addWords(AddWordsOptions addWordsOptions) { Validator.notNull(addWordsOptions, "addWordsOptions cannot be null"); String[] pathSegments = { "v1/customizations", "words" }; String[] pathParameters = { addWordsOptions.customizationId() }; RequestBuilder builder = RequestBuilder.po...
[ "public", "ServiceCall", "<", "Void", ">", "addWords", "(", "AddWordsOptions", "addWordsOptions", ")", "{", "Validator", ".", "notNull", "(", "addWordsOptions", ",", "\"addWordsOptions cannot be null\"", ")", ";", "String", "[", "]", "pathSegments", "=", "{", "\"v...
Add custom words. Adds one or more words and their translations to the specified custom voice model. Adding a new translation for a word that already exists in a custom model overwrites the word's existing translation. A custom model can contain no more than 20,000 entries. You must use credentials for the instance of...
[ "Add", "custom", "words", "." ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/TextToSpeech.java#L626-L641