Tabnine Logo
ClientContext
Code IndexAdd Tabnine to your IDE (free)

How to use
ClientContext
in
juzu.request

Best Java code snippets using juzu.request.ClientContext (Showing top 9 results out of 315)

origin: juzu/juzu

 public InputStream getInputStream() throws IOException {
  return context.getInputStream();
 }
};
origin: juzu/juzu

public String getContentType() {
 return context.getContentType();
}
public int getContentLength() {
origin: juzu/juzu

public String getCharacterEncoding() {
 return context.getCharacterEncoding();
}
public String getContentType() {
origin: juzu/juzu

public int getContentLength() {
 return context.getContentLenth();
}
public InputStream getInputStream() throws IOException {
origin: juzu/juzu

 @Override
 public void unmarshall(
   String mediaType,
   ClientContext context,
   Iterable<Map.Entry<ContextualParameter, Object>> contextualArguments,
   Map<String, RequestParameter> parameterArguments) throws IOException {

  //
  ObjectMapper mapper = new ObjectMapper();

  // Parse the payload first
  JsonNode tree = mapper.readTree(context.getInputStream());

  for (Map.Entry<ContextualParameter, Object> contextualArgument : contextualArguments) {
   Class<?> type = contextualArgument.getKey().getType();
   if (JsonNode.class.isAssignableFrom(type)) {
    contextualArgument.setValue(tree);
   } else if (contextualArgument.getKey().getAnnotations().getAnnotation(Jackson.class) != null) {
    Object value = mapper.readValue(new TreeTraversingParser(tree), type);
    contextualArgument.setValue(value);
   }
  }
 }
}
origin: juzu/juzu

String contentType = clientContext.getContentType();
if (contentType != null) {
 Spliterator i = new Spliterator(contentType, ';');
origin: org.juzu/juzu-core

 public void unmarshall(String mediaType, ClientContext context, Iterable<Map.Entry<ContextualParameter, Object>> contextualArguments, Map<String, RequestParameter> parameterArguments) throws IOException {
  byte[] data = Tools.bytes(context.getInputStream());
  Foo foo = new Foo(data);
  for  (Map.Entry<ContextualParameter, Object> parameter : contextualArguments) {
   if (parameter.getKey().getType().equals(Foo.class)) {
    parameter.setValue(foo);
    break;
   }
  }
 }
}
origin: org.juzu/juzu-core

String contentType = clientContext.getContentType();
if (contentType != null) {
 Spliterator i = new Spliterator(contentType, ';');
origin: juzu/juzu

 public void unmarshall(String mediaType, ClientContext context, Iterable<Map.Entry<ContextualParameter, Object>> contextualArguments, Map<String, RequestParameter> parameterArguments) throws IOException {
  byte[] data = Tools.bytes(context.getInputStream());
  Foo foo = new Foo(data);
  for  (Map.Entry<ContextualParameter, Object> parameter : contextualArguments) {
   if (parameter.getKey().getType().equals(Foo.class)) {
    parameter.setValue(foo);
    break;
   }
  }
 }
}
juzu.requestClientContext

Most used methods

  • getInputStream
  • getContentType
  • getCharacterEncoding
  • getContentLenth

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Kernel (java.awt.image)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • JList (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now