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

How to use
InputPipeInvocationHandler
in
com.ociweb.pronghorn.pipe.proxy

Best Java code snippets using com.ociweb.pronghorn.pipe.proxy.InputPipeInvocationHandler (Showing top 9 results out of 315)

origin: com.ociweb/PronghornPipes

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {							
  return readers[buildKey(this,method.getName())].read(args);
}
origin: com.ociweb/PronghornPipes

private static <T> T slowCreate(final EventProducer consumer, Class<T> clazz) {
  int msgIdx = FieldReferenceOffsetManager.lookupTemplateLocator(clazz.getAnnotation(ProngTemplateMessage.class).templateId(), Pipe.from(consumer.input));
  if (PipeReader.tryReadFragment(consumer.input)) {
    
    T result = (T) Proxy.newProxyInstance(
              clazz.getClassLoader(),
              new Class[] { clazz },
              new InputPipeInvocationHandler(consumer.input, PipeReader.getMsgIdx(consumer.input), clazz));	
    
    consumer.cached = result; //TODO: needs smarter pool but this is fine for now.
    consumer.cachedMsgId = PipeReader.getMsgIdx(consumer.input);
    
    return result;
    
  } else {
    return null;
  }
}
origin: oci-pronghorn/Pronghorn

private static <T> T slowCreate(final EventProducer consumer, Class<T> clazz) {
  int msgIdx = FieldReferenceOffsetManager.lookupTemplateLocator(clazz.getAnnotation(ProngTemplateMessage.class).templateId(), Pipe.from(consumer.input));
  if (PipeReader.tryReadFragment(consumer.input)) {
    
    T result = (T) Proxy.newProxyInstance(
              clazz.getClassLoader(),
              new Class[] { clazz },
              new InputPipeInvocationHandler(consumer.input, PipeReader.getMsgIdx(consumer.input), clazz));	
    
    consumer.cached = result; //TODO: needs smarter pool but this is fine for now.
    consumer.cachedMsgId = PipeReader.getMsgIdx(consumer.input);
    
    return result;
    
  } else {
    return null;
  }
}
origin: com.ociweb/pronghorn-pipes

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {							
  return readers[buildKey(this,method.getName())].read(args);
}
origin: com.ociweb/pronghorn-pipes

private static <T> T slowCreate(final EventProducer consumer, Class<T> clazz) {
  int msgIdx = FieldReferenceOffsetManager.lookupTemplateLocator(clazz.getAnnotation(ProngTemplateMessage.class).templateId(), Pipe.from(consumer.input));
  if (PipeReader.tryReadFragment(consumer.input)) {
    
    T result = (T) Proxy.newProxyInstance(
              clazz.getClassLoader(),
              new Class[] { clazz },
              new InputPipeInvocationHandler(consumer.input, PipeReader.getMsgIdx(consumer.input), clazz));	
    
    consumer.cached = result; //TODO: needs smarter pool but this is fine for now.
    consumer.cachedMsgId = PipeReader.getMsgIdx(consumer.input);
    
    return result;
    
  } else {
    return null;
  }
}
origin: oci-pronghorn/Pronghorn

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {							
  return readers[buildKey(this,method.getName())].read(args);
}
origin: com.ociweb/pronghorn-pipes

public InputPipeInvocationHandler(Pipe pipe, int msgIdx, Class<?> clazz) {
  super(clazz.getMethods());
  
  FieldReferenceOffsetManager from = Pipe.from(pipe);
  final Method[] methods = clazz.getMethods();
            
  readers = new InputPipeReaderMethod[MAX_METHODS];
  int j = methods.length;
  while (--j>=0) {
    final Method method = methods[j];			
    ProngTemplateField fieldAnnotation = method.getAnnotation(ProngTemplateField.class);
    if (null!=fieldAnnotation) {
      
      int fieldLoc = FieldReferenceOffsetManager.lookupFieldLocator(fieldAnnotation.fieldId(), msgIdx, from);
      
      int key = buildKey(this, method.getName());
      if (null!=readers[key]) {
        throw new UnsupportedOperationException();
      }
      readers[key] = InputPipeReaderMethod.buildReadForYourType(pipe, fieldLoc, (fieldLoc >> FieldReferenceOffsetManager.RW_FIELD_OFF_BITS) & TokenBuilder.MASK_TYPE, from);
              
    }
  }
}
origin: oci-pronghorn/Pronghorn

public InputPipeInvocationHandler(Pipe pipe, int msgIdx, Class<?> clazz) {
  super(clazz.getMethods());
  
  FieldReferenceOffsetManager from = Pipe.from(pipe);
  final Method[] methods = clazz.getMethods();
            
  readers = new InputPipeReaderMethod[MAX_METHODS];
  int j = methods.length;
  while (--j>=0) {
    final Method method = methods[j];			
    ProngTemplateField fieldAnnotation = method.getAnnotation(ProngTemplateField.class);
    if (null!=fieldAnnotation) {
      
      int fieldLoc = FieldReferenceOffsetManager.lookupFieldLocator(fieldAnnotation.fieldId(), msgIdx, from);
      
      int key = buildKey(this, method.getName());
      if (null!=readers[key]) {
        throw new UnsupportedOperationException();
      }
      readers[key] = InputPipeReaderMethod.buildReadForYourType(pipe, fieldLoc, (fieldLoc >> FieldReferenceOffsetManager.RW_FIELD_OFF_BITS) & TokenBuilder.MASK_TYPE, from);
              
    }
  }
}
origin: com.ociweb/PronghornPipes

public InputPipeInvocationHandler(Pipe pipe, int msgIdx, Class<?> clazz) {
  super(clazz.getMethods());
  
  FieldReferenceOffsetManager from = Pipe.from(pipe);
  final Method[] methods = clazz.getMethods();
            
  readers = new InputPipeReaderMethod[MAX_METHODS];
  int j = methods.length;
  while (--j>=0) {
    final Method method = methods[j];			
    ProngTemplateField fieldAnnotation = method.getAnnotation(ProngTemplateField.class);
    if (null!=fieldAnnotation) {
      
      int fieldLoc = FieldReferenceOffsetManager.lookupFieldLocator(fieldAnnotation.fieldId(), msgIdx, from);
      
      int key = buildKey(this, method.getName());
      if (null!=readers[key]) {
        throw new UnsupportedOperationException();
      }
      readers[key] = InputPipeReaderMethod.buildReadForYourType(pipe, fieldLoc, (fieldLoc >> FieldReferenceOffsetManager.RW_FIELD_OFF_BITS) & TokenBuilder.MASK_TYPE, from);
              
    }
  }
}
com.ociweb.pronghorn.pipe.proxyInputPipeInvocationHandler

Most used methods

  • <init>
  • buildKey

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Reference (javax.naming)
  • Top Sublime Text 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