Examples of CallbackFactory


Examples of org.fusesource.restygwt.client.callback.CallbackFactory

        CallbackFilter xsrfCallbackFilter = new XSRFTokenCallbackFilter(xsrf);

        QueueableCacheStorage cache = new DefaultQueueableCacheStorage();

        CallbackFilter cachingCallbackFilter = new CachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new RetryingCallbackFactory(xsrfCallbackFilter, cachingCallbackFilter);
        DispatcherFilter cachingDispatcherFilter = new CachingDispatcherFilter(cache, callbackFactory);

        FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher(xsrfDispatcherFilter, cachingDispatcherFilter);

        return dispatcher;
View Full Code Here

Examples of org.fusesource.restygwt.client.callback.CallbackFactory

    public FilterawareDispatcher restfulCachingDispatcher(){
        QueueableCacheStorage cache = new DefaultQueueableCacheStorage();

        CallbackFilter cachingCallbackFilter = new RestfulCachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new DefaultCallbackFactory(cachingCallbackFilter);
        DispatcherFilter cachingDispatcherFilter = new RestfulCachingDispatcherFilter(cache, callbackFactory);

        FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher(cachingDispatcherFilter);

        return dispatcher;
View Full Code Here

Examples of org.fusesource.restygwt.client.callback.CallbackFactory

        CallbackFilter xsrfCallbackFilter = new XSRFTokenCallbackFilter(xsrf);

        QueueableCacheStorage cache = new DefaultQueueableCacheStorage();

        CallbackFilter cachingCallbackFilter = new RestfulCachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new DefaultCallbackFactory(xsrfCallbackFilter, cachingCallbackFilter);
        DispatcherFilter cachingDispatcherFilter = new RestfulCachingDispatcherFilter(cache, callbackFactory);

        FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher(xsrfDispatcherFilter, cachingDispatcherFilter);

        return dispatcher;
View Full Code Here

Examples of org.fusesource.restygwt.client.callback.CallbackFactory

    public FilterawareDispatcher restfulRetryingCachingDispatcher(){
        QueueableCacheStorage cache = new DefaultQueueableCacheStorage();

        CallbackFilter cachingCallbackFilter = new RestfulCachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new RetryingCallbackFactory(cachingCallbackFilter);
        DispatcherFilter cachingDispatcherFilter = new RestfulCachingDispatcherFilter(cache, callbackFactory);

        FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher(cachingDispatcherFilter);

        return dispatcher;
View Full Code Here

Examples of org.fusesource.restygwt.client.callback.CallbackFactory

        CallbackFilter xsrfCallbackFilter = new XSRFTokenCallbackFilter(xsrf);

        QueueableCacheStorage cache = new DefaultQueueableCacheStorage();

        CallbackFilter cachingCallbackFilter = new RestfulCachingCallbackFilter(cache);
        CallbackFactory callbackFactory = new RetryingCallbackFactory(xsrfCallbackFilter, cachingCallbackFilter);
        DispatcherFilter cachingDispatcherFilter = new RestfulCachingDispatcherFilter(cache, callbackFactory);

        FilterawareDispatcher dispatcher = new DefaultFilterawareDispatcher(xsrfDispatcherFilter, cachingDispatcherFilter);

        return dispatcher;
View Full Code Here

Examples of org.jruby.runtime.CallbackFactory

    }
   
    public static CompiledBlockCallback createBlockCallback(Ruby runtime, Object scriptObject, String closureMethod) {
        Class scriptClass = scriptObject.getClass();
        ClassLoader scriptClassLoader = scriptClass.getClassLoader();
        CallbackFactory factory = CallbackFactory.createFactory(runtime, scriptClass, scriptClassLoader);
       
        return factory.getBlockCallback(closureMethod, scriptObject);
    }
View Full Code Here

Examples of org.jruby.runtime.CallbackFactory

    private static final double SQRT_10 = 3.162277660168379332;
   
    public static RubyClass createBigDecimal(Ruby runtime) {
        RubyClass result = runtime.defineClass("BigDecimal",runtime.getNumeric(), BIGDECIMAL_ALLOCATOR);

        CallbackFactory callbackFactory = runtime.callbackFactory(RubyBigDecimal.class);

        runtime.getKernel().defineAnnotatedMethods(BigDecimalKernelMethods.class);

        result.setInternalModuleVariable("vpPrecLimit", RubyFixnum.zero(runtime));
        result.setInternalModuleVariable("vpExceptionMode", RubyFixnum.zero(runtime));
View Full Code Here

Examples of org.jruby.runtime.CallbackFactory

     *
     */
    @JRubyMethod(name = "to_proc", frame = true)
    public IRubyObject to_proc(ThreadContext context, Block unusedBlock) {
        Ruby runtime = context.getRuntime();
        CallbackFactory f = runtime.callbackFactory(RubyMethod.class);
        Block block = MethodBlock.createMethodBlock(context, context.getCurrentScope(),
                f.getBlockMethod("bmcall"), this, runtime.getTopSelf());
       
        while (true) {
            try {
                // FIXME: We should not be regenerating this over and over
                return mproc(context, block);
View Full Code Here

Examples of org.jruby.runtime.CallbackFactory

    public static void createHttp11(Ruby runtime) {
        RubyModule mMongrel = runtime.defineModule("Mongrel");
        mMongrel.defineClassUnder("HttpParserError",runtime.getClass("IOError"),runtime.getClass("IOError").getAllocator());

        CallbackFactory cf = runtime.callbackFactory(Http11.class);

        RubyClass cHttpParser = mMongrel.defineClassUnder("HttpParser",runtime.getObject(),ALLOCATOR);
        cHttpParser.defineFastMethod("initialize",cf.getFastMethod("initialize"));
        cHttpParser.defineFastMethod("reset",cf.getFastMethod("reset"));
        cHttpParser.defineFastMethod("finish",cf.getFastMethod("finish"));
        cHttpParser.defineFastMethod("execute",cf.getFastMethod("execute", IRubyObject.class, IRubyObject.class, IRubyObject.class));
        cHttpParser.defineFastMethod("error?",cf.getFastMethod("has_error"));
        cHttpParser.defineFastMethod("finished?",cf.getFastMethod("is_finished"));
        cHttpParser.defineFastMethod("nread",cf.getFastMethod("nread"));
    }
View Full Code Here

Examples of org.jruby.runtime.CallbackFactory

public class FastXsService implements BasicLibraryService {

    public boolean basicLoad(final Ruby runtime) throws IOException {
        RubyModule string = runtime.getModule("String");
        CallbackFactory fact = runtime.callbackFactory(FastXsService.class);
        string.defineMethod("fast_xs",fact.getFastSingletonMethod("fast_xs"));
        return true;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.