Examples of SocketConnection


Examples of com.google.code.http4j.impl.conn.SocketConnection

    host = new BasicHost("www.google.com");
    connection = createConnection();
  }
 
  private Connection createConnection() throws IOException {
    return new SocketConnection(host);
  }
View Full Code Here

Examples of com.google.code.http4j.impl.conn.SocketConnection

    host = new BasicHost("www.google.com");
    connection = createConnection();
  }
 
  private Connection createConnection() throws IOException {
    return new SocketConnection(host);
  }
View Full Code Here

Examples of com.google.code.http4j.impl.conn.SocketConnection

    return instance;
  }

  @Override
  public Connection createConnection(Host host) throws IOException {
    return new SocketConnection(host);
  }
View Full Code Here

Examples of com.lmax.ant.paralleljunit.util.net.SocketConnection

    public RemoteTestRunnerController create(final int workerId, final ParallelJUnitTaskConfig config)
    {
        final ServerSocket serverSocket = createServerSocket();
        final Future<SocketConnection> connectionFuture = executorService.submit(connectionEstablisherFactory.create(serverSocket));
        final ManagedProcess jvmProcess = managedProcessFactory.create(workerId, config, serverSocket.getLocalPort());
        final SocketConnection socketConnection = waitForSocketConnection(connectionFuture);
        return new RemoteTestRunnerController(jvmProcess, socketConnection, testSpecificationFactory);
    }
View Full Code Here

Examples of com.lmax.ant.paralleljunit.util.net.SocketConnection

    private void executeTests()
    {
        try
        {
            final SocketConnection socketConnection = connectionFactory.createSocketConnection(paramsRemote.getServerPort());

            final Collection<?> formatters = getTestRunnerFormatters();

            RemoteTestRunnerCommand command = null;
            while ((command = socketConnection.readObject()) != null)
            {
                switch (command)
                {
                    case EXIT:
                        socketConnection.close();
                        System.exit(0);
                        break;
                    case RUN_TEST:
                        formatters.clear();
                        socketConnection.writeObject(runTest(socketConnection.<TestSpecification>readObject(), paramsRemote));
                        break;
                    default:
                        throw new RuntimeException("All hell broke loose");
                }
            }
View Full Code Here

Examples of com.sun.jmx.remote.socket.SocketConnection

      EnvHelp.resolveClientClassLoader(newEnv);
  newEnv.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER,
       defaultClassLoader);
  if (!newEnv.containsKey(MESSAGE_CONNECTION)) {
      MessageConnection conn =
    new SocketConnection(address.getHost(), address.getPort());
      newEnv.put(MESSAGE_CONNECTION, conn);
  }
  super.connect(newEnv);
    }
View Full Code Here

Examples of de.hpi.eworld.eworldeventserver.socketconnection.SocketConnection

    try{
      core = Core.getInstance(null);
      serverSocket = new ServerSocket(cEworldEventServer.port);
      assignedPort = serverSocket.getLocalPort();

      SocketConnection socketConnection = new SocketConnection();
      socketConnection.success = true;
      socketConnection.port = assignedPort;
      Gson gson = new Gson();
      String json = gson.toJson(socketConnection, SocketConnection.class);
View Full Code Here

Examples of javax.microedition.io.SocketConnection

    /**
     * The socket listener loop.  Awaits a connection, processes requests from
     * the connection, then goes back to waiting, forever.
     */
    public void run() {
        SocketConnection sock;

        while (true) {
            d("listening on port " + PORT);
            try {
                sock = (SocketConnection)serv.acceptAndOpen();
View Full Code Here

Examples of javax.microedition.io.SocketConnection

            task.setExecutable(new org.netbeans.microedition.util.Executable() {
                public void execute() throws Exception {//GEN-END:|49-getter|1|49-execute

                    InputStream imageInputStream = fileCon.openInputStream();
                    transferWaitScreen.setText("Connecting to server on port " + serverPort + "...");
                    SocketConnection sc = (SocketConnection) Connector.open("socket://" +
                            serverAddress + ":" + serverPort);

                    DataInputStream dis = sc.openDataInputStream();
                    DataOutputStream dos = sc.openDataOutputStream();

                    transferWaitScreen.setText("Sending candidates number (" + candidatesNumber + ") ...");
                    dos.write(Integer.parseInt(candidatesNumber));
                    dos.flush();
View Full Code Here

Examples of javax.microedition.io.SocketConnection

      if(Modbus.debug) System.out.println("Listenening to " + m_ServerSocket.toString() + "(Port " + m_Port + ")");

      //Infinite loop, taking care of resources in case of a lot of parallel logins
      do {
        //FPFSocket incoming = m_ServerSocket.accept();
      SocketConnection incoming = (SocketConnection)m_ServerSocket.acceptAndOpen();
        if (Modbus.debug) System.out.println("Making new connection " + incoming.toString());
        if (m_Listening) {
          //FIXME: Replace with object pool due to resource issues
          m_ThreadPool.execute(
              new TCPConnectionHandler(
                  new TCPSlaveConnection(incoming)
              )
          );
          count();
        } else {
          //just close the socket
          incoming.close();
        }
      } while (m_Listening);
    } catch (IOException/*SocketException*/ iex) {
      if (!m_Listening) {
        return;
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.