Examples of RemoteService


Examples of com.alibaba.dubbo.rpc.protocol.dubbo.support.RemoteService

    {
        DemoService service = new DemoServiceImpl();
        protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName())));
        service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName())));
       
        RemoteService remote = new RemoteServiceImpl();
        protocol.export(proxy.getInvoker(remote, RemoteService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + RemoteService.class.getName())));
        remote = proxy.getProxy(protocol.refer(RemoteService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + RemoteService.class.getName())));
       
        service.sayHello("world");
       
        // test netty client
        assertEquals("world", service.echo("world"));
        assertEquals("hello world@" + RemoteServiceImpl.class.getName(), remote.sayHello("world"));
       
        EchoService serviceEcho = (EchoService)service;
        assertEquals(serviceEcho.$echo("test"), "test");
       
        EchoService remoteEecho = (EchoService)remote;
View Full Code Here

Examples of com.google.gwt.user.client.rpc.RemoteService

        return null;
    }

    @Override
    public String processCall(String payload) throws SerializationException {
        RemoteService remoteService = null;
        RPCRequest rpcRequest = null;
        try {
            remoteService = (RemoteService) applicationContext.getBean(remoteServiceName);
            setServiceData(remoteService, false);

            rpcRequest = RPC.decodeRequest(payload, remoteService.getClass(), this);
           
            if (logger.isDebugEnabled()) {
                logger.debug("Executing method " + rpcRequest.getMethod());
            }

            return RPC.invokeAndEncodeResponse(remoteService, rpcRequest
                    .getMethod(), rpcRequest.getParameters(), rpcRequest
                    .getSerializationPolicy());
        } catch (Exception e) {
            if (rpcRequest != null) {
                logger.error("An error occurred calling the GWT service method " + rpcRequest.getMethod() + ". Cause: " + e.getMessage(), e);
            } else {
                logger.error("An error occurred calling the GWT service " + (remoteService != null ? remoteService.getClass().getName() : remoteServiceName) + ". Cause: " + e.getMessage(), e);
            }
            return RPC.encodeResponseForFailure(null, e);
        } finally {
            if (remoteService != null) {
                setServiceData(remoteService, true);
View Full Code Here

Examples of com.google.gwt.user.client.rpc.RemoteService

  public String processCall(String payload) throws SerializationException {
    //http://forum.springsource.org/archive/index.php/t-54931.html process request
    try {
      RPCRequest req = RPC.decodeRequest(payload, null, this);

      RemoteService service = (RemoteService) injector.getInstance(req
          .getMethod().getDeclaringClass());
     
      long start = System.currentTimeMillis();
      logger.info("Processing incoming request for " + service.getClass() + "." + req.getMethod());
     
      String result = RPC.invokeAndEncodeResponse(service, req.getMethod(),
          req.getParameters(), req.getSerializationPolicy());
     
      long end = System.currentTimeMillis();
View Full Code Here

Examples of com.hazelcast.spi.RemoteService

    private void destroyLocalDistributedObject(String serviceName, String name, boolean fireEvent) {
        ProxyRegistry registry = registries.get(serviceName);
        if (registry != null) {
            registry.destroyProxy(name, fireEvent);
        }
        final RemoteService service = nodeEngine.getService(serviceName);
        if (service != null) {
            service.destroyDistributedObject(name);
        }
        Throwable cause = new DistributedObjectDestroyedException(serviceName, name);
        nodeEngine.waitNotifyService.cancelWaitingOps(serviceName, name, cause);
    }
View Full Code Here

Examples of com.hazelcast.spi.RemoteService

    public static MapService create(NodeEngine nodeEngine) {
        final MapServiceContext mapServiceContext = new DefaultMapServiceContext(nodeEngine);
        final ManagedService managedService = new MapManagedService(mapServiceContext);
        final MigrationAwareService migrationAwareService = new MapMigrationAwareService(mapServiceContext);
        final TransactionalService transactionalService = new MapTransactionalService(mapServiceContext);
        final RemoteService remoteService = new MapRemoteService(mapServiceContext);
        final EventPublishingService eventPublisher = new MapEventPublishingService(mapServiceContext);
        final PostJoinAwareService postJoinAwareService = new MapPostJoinAwareService(mapServiceContext);
        final SplitBrainHandlerService splitBrainHandler = new MapSplitBrainHandler(mapServiceContext);
        final ReplicationSupportingService replicationSupportingService
                = new MapReplicationSupportingService(mapServiceContext, nodeEngine);
View Full Code Here

Examples of com.hazelcast.spi.RemoteService

    private void destroyLocalDistributedObject(String serviceName, String name, boolean fireEvent) {
        ProxyRegistry registry = registries.get(serviceName);
        if (registry != null) {
            registry.destroyProxy(name, fireEvent);
        }
        final RemoteService service = nodeEngine.getService(serviceName);
        if (service != null) {
            service.destroyDistributedObject(name);
        }
        Throwable cause = new DistributedObjectDestroyedException(serviceName, name);
        nodeEngine.waitNotifyService.cancelWaitingOps(serviceName, name, cause);
    }
View Full Code Here

Examples of com.hazelcast.spi.RemoteService

    public static MapService create(NodeEngine nodeEngine) {
        final MapServiceContext mapServiceContext = new DefaultMapServiceContext(nodeEngine);
        final ManagedService managedService = new MapManagedService(mapServiceContext);
        final MigrationAwareService migrationAwareService = new MapMigrationAwareService(mapServiceContext);
        final TransactionalService transactionalService = new MapTransactionalService(mapServiceContext);
        final RemoteService remoteService = new MapRemoteService(mapServiceContext);
        final EventPublishingService eventPublisher = new MapEventPublishingService(mapServiceContext);
        final PostJoinAwareService postJoinAwareService = new MapPostJoinAwareService(mapServiceContext);
        final SplitBrainHandlerService splitBrainHandler = new MapSplitBrainHandlerService(mapServiceContext);
        final ReplicationSupportingService replicationSupportingService
                = new MapReplicationSupportingService(mapServiceContext);
View Full Code Here

Examples of com.hazelcast.spi.RemoteService

    private void destroyLocalDistributedObject(String serviceName, String name, boolean fireEvent) {
        ProxyRegistry registry = registries.get(serviceName);
        if (registry != null) {
            registry.destroyProxy(name, fireEvent);
        }
        final RemoteService service = nodeEngine.getService(serviceName);
        if (service != null) {
            service.destroyDistributedObject(name);
        }
        Throwable cause = new DistributedObjectDestroyedException(serviceName, name);
        nodeEngine.waitNotifyService.cancelWaitingOps(serviceName, name, cause);
    }
View Full Code Here

Examples of org.apache.cayenne.remote.RemoteService

        ServerRuntime runtime = new ServerRuntime(configurationLocation, modules);

        DataChannel channel = runtime.getChannel();

        RemoteService service = runtime.getInjector().getInstance(RemoteService.class);

        SerializerFactory serializerFactory = HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                channel.getEntityResolver());
View Full Code Here

Examples of org.apache.cayenne.remote.RemoteService

        ServerRuntime runtime = new ServerRuntime(configurationLocation, modules
                .toArray(new Module[modules.size()]));

        DataChannel channel = runtime.getChannel();

        RemoteService service = runtime.getInjector().getInstance(RemoteService.class);

        SerializerFactory serializerFactory = HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                channel.getEntityResolver());
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.