Examples of ClientHandler


Examples of de.novanic.eventservice.client.ClientHandler

        ServiceDefTarget theServiceDefTargetMock = mock(ServiceDefTarget.class);
       
        when(theServiceDefTargetMock.getServiceEntryPoint()).thenReturn("Test-URL");

        ClientHandler theClientHandler = new DefaultClientHandler("ABC123");
        theRemoteEventServiceFactory.registerClientSpecificHandler(theServiceDefTargetMock, theClientHandler);

        verify(theServiceDefTargetMock, times(1)).getServiceEntryPoint();
    }
View Full Code Here

Examples of de.novanic.eventservice.client.ClientHandler

    public void requestClientHandler(final AsyncCallback<ClientHandler> anAsyncCallback) {
        RemoteEventServiceAccessor theRemoteEventServiceAccessor = (RemoteEventServiceAccessor)getRemoteEventService();
        theRemoteEventServiceAccessor.schedule(new GetClientIdCommand(new AsyncCallbackWrapper<ClientHandler>(anAsyncCallback) {
            public void onSuccess(ClientHandler aClientHandler) {
                String theConnectionId = ConfigurationTransferableDependentFactory.getConfiguration().getConnectionId();
                ClientHandler theClientHandler = new DefaultClientHandler(theConnectionId);
                super.onSuccess(theClientHandler);
            }
        }));
    }
View Full Code Here

Examples of info.walnutstreet.vs.ps03.appserver.handler.ClientHandler

   */
  @Override
  public void run() {
    while (this.listen) {
      try {
        ClientHandler clientHandler = new ClientHandler(this.serverSocket.accept());
        DataStore.getInstance().addClientHandler(clientHandler);
        clientHandler.start();
      } catch (SocketTimeoutException e) {
        /* timeout */
      } catch (IOException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of info.walnutstreet.vs.ps03v2.server.handler.ClientHandler

     
      ServerSocket serverSocket = new ServerSocket(port);
      Server.logger.debug("Application-Server started on port " + port);
      while (true) {
        Socket socket = serverSocket.accept();
        ClientHandler handler = new ClientHandler(socket);
        handler.start();
      }
    } catch (NumberFormatException e) {
      Server.logger.error("Please specify a valid port!");
    }
  }
View Full Code Here

Examples of net.hasor.rsf.runtime.client.netty.ClientHandler

            b.option(ChannelOption.SO_KEEPALIVE, true);
            b.handler(new ChannelInitializer<SocketChannel>() {
                public void initChannel(SocketChannel ch) throws Exception {
                    ch.pipeline().addLast(//
                            new RSFCodec(),//
                            new ClientHandler(manager));
                }
            });
            //发起100万次调用.
            ChannelFuture f = b.connect(host, port).sync();
            {
View Full Code Here

Examples of net.hasor.rsf.runtime.client.netty.ClientHandler

        boot.channel(NioSocketChannel.class);
        boot.option(ChannelOption.SO_KEEPALIVE, true);
        final RsfContext rsfContext = this.rsfContext;
        boot.handler(new ChannelInitializer<SocketChannel>() {
            public void initChannel(SocketChannel ch) throws Exception {
                ch.pipeline().addLast(new RSFCodec(), new ClientHandler(rsfContext));
            }
        });
        ChannelFuture future = null;
        if (localAddress != null) {
            future = boot.connect(remoteAddress, localAddress);
View Full Code Here

Examples of org.quickserver.net.server.ClientHandler

        if(QSObjectPool.class.isInstance(objectPool)==false) {
          handler.sendClientMsg("-ERR System Error!");
        }

        ClientIdentifier clientIdentifier = target.getClientIdentifier();
        ClientHandler foundClientHandler = null;
        synchronized(clientIdentifier.getObjectToSynchronize()) { 
          Iterator iterator = clientIdentifier.findAllClient();
          handler.sendClientMsg("+OK info follows");
          while(iterator.hasNext()) {
            foundClientHandler = (ClientHandler) iterator.next();
            handler.sendClientMsg(foundClientHandler.info());
          }
        }
        handler.sendClientMsg(".");
      } else {
        handler.sendClientMsg("-ERR Pool Closed");
View Full Code Here

Examples of org.quickserver.net.server.ClientHandler

      String room, String msg) throws SocketTimeoutException,
        IOException {
    if(room==null || msg==null) return;
    Iterator iterator = handler.getServer().findAllClientByKey(
      ".+@"+room);
    ClientHandler toHandler = null;
    if(iterator.hasNext()) {
      while(iterator.hasNext()) {
        if(msg.equals("LoggedOut")==false)
          handler.isConnected();//check if src is still alive
        toHandler = (ClientHandler) iterator.next();
View Full Code Here

Examples of org.quickserver.net.server.ClientHandler

    if(j!=command.length())
      message = command.substring(j+1);
    else
      message = "";

    ClientHandler toHandler = null;
    Iterator iterator = null;
    if(id.indexOf("@")!=-1) {
      toHandler = handler.getServer().findClientByKey(id);
      List list = new ArrayList();
      if(toHandler!=null) {
View Full Code Here

Examples of org.quickserver.net.server.ClientHandler

      return new NonBlockingClientHandler(id);
  }

  //Uninitialize an instance to be returned to the pool.
    public void passivateObject(Object obj) {
    ClientHandler ch = (ClientHandler)obj;
    ch.clean();
    }
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.