Examples of SocketConnection


Examples of org.jsmpp.session.connection.socket.SocketConnection

    public Connection createConnection(String host, int port) throws IOException {
        try {
            SocketFactory socketFactory = SSLSocketFactory.getDefault();
            Socket socket = socketFactory.createSocket(host, port);

            return new SocketConnection(socket);

        } catch (Exception e) {
            throw new IOException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.jsmpp.session.connection.socket.SocketConnection

    public Connection createConnection(String host, int port) throws IOException {
        try {
            SocketFactory socketFactory = SSLSocketFactory.getDefault();
            Socket socket = socketFactory.createSocket(host, port);

            return new SocketConnection(socket);

        } catch (Exception e) {
            throw new IOException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

   * @return a closable that can be invoked in case the service is to be shut
   *         down
   */
  public Closeable initialize() {
    try {
      Connection connection = new SocketConnection(this);
      SocketAddress address = new InetSocketAddress(PORT_NUMBER);
      connection.connect(address);
      logger.info("HTTP service for ExtensionSwap installation running on port {}", PORT_NUMBER);
      return connection;
    } catch (IOException e) {
      logger.warn("Could not host HTTP service for ExtensionSwap installation on port " + PORT_NUMBER
          + ". Automatic installations of extensions will not be available.", e);
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

        // Complete initialization
        Container container = new SimpleContainer(this);
        ContainerServer server = new ContainerServer(container,
                getDefaultThreads());
        SimpleServer filter = new SimpleServer(server);
        Connection connection = new SocketConnection(filter);
        setConfidential(true);
        setContainerServer(server);
        setConnection(connection);

        // Effectively connect the server socket
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

        }
        final Container container = new SimpleContainer(this);
        final ContainerServer server = new ContainerServer(container,
                getDefaultThreads());
        final SimpleServer restletServer = new SimpleServer(server);
        final Connection connection = new SocketConnection(restletServer);

        setConfidential(false);
        setContainerServer(server);
        setConnection(connection);
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

        this.container = container;
    }

    public void start() throws IOException
    {
        connection = new SocketConnection(container);
        connection.connect(address);
    }
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

    public String host() {
        return host;
    }

    public void run(final Application app) throws IOException {
        connection = new SocketConnection(new ContainerServer(new ApplicationContainer(app)));
        connection.connect(new InetSocketAddress(host, port));
    }
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

  public Tracker(InetSocketAddress address, String version)
    throws IOException {
    this.address = address;

    this.torrents = new ConcurrentHashMap<String, TrackedTorrent>();
    this.connection = new SocketConnection(
        new TrackerService(version, this.torrents));
  }
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

      SSLContext sslContext = context.getContext();
      Agent agent = new MockAgent();
      TransportProcessor processor = new TransportProcessor();
      ProcessorServer server = new ProcessorServer(processor);
      ConfigurableCertificateServer certServer = new ConfigurableCertificateServer(server);
      SocketConnection con = new SocketConnection(certServer, agent);
      SocketAddress serverAddress = new InetSocketAddress(listenPort);
     
      certServer.setCertRequired(certificateRequired);
      con.connect(serverAddress, sslContext);
     
      return con;
   }
View Full Code Here

Examples of org.simpleframework.transport.connect.SocketConnection

      TransportGrabber grabber = new TransportGrabber(processor);
      ProcessorServer processorServer = new ProcessorServer(grabber);
     
      this.server = new ConfigurableCertificateServer(processorServer, certRequired)
      this.agent = new ConsoleAgent();
      this.connection = new SocketConnection(server, agent);
      this.address = new InetSocketAddress(port);
      this.context = context;
   }  
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.