com.linkedin.restli.client.InboundRequestContextImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parseq-restli-client Show documentation
Show all versions of parseq-restli-client Show documentation
Uploads all artifacts belonging to configuration ':parseq-restli-client:archives'
package com.linkedin.restli.client;
import java.util.Optional;
class InboundRequestContextImpl implements InboundRequestContext {
private final String _name;
private final String _method;
private final Optional _finderName;
private final Optional _actionName;
public InboundRequestContextImpl(String name, String method, Optional finderName,
Optional actionName) {
if (finderName.isPresent()) {
if (!method.equalsIgnoreCase("FINDER")) {
throw new IllegalArgumentException("Finder name declared but menthod is not FINDER, it is: " + method);
}
if (actionName.isPresent()) {
throw new IllegalArgumentException("Action name declared but method if FINDER");
}
}
if (actionName.isPresent()) {
if (!method.equalsIgnoreCase("ACTION")) {
throw new IllegalArgumentException("Action name declared but menthod is not ACTION, it is: " + method);
}
}
_name = name;
_method = method;
_finderName = finderName;
_actionName = actionName;
}
@Override
public String getName() {
return _name;
}
@Override
public String getMethod() {
return _method;
}
@Override
public Optional getFinderName() {
return _finderName;
}
@Override
public Optional getActionName() {
return _actionName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy