Package java.net

Examples of java.net.InetSocketAddress


        stubManager.registerStub(s);
    }

    @ManagedOperation
    public boolean removeInitialHost(String hostname, int port) {
        InetSocketAddress isa = new InetSocketAddress(hostname, port);       
        RouterStub unregisterStub = stubManager.unregisterStub(isa);
        if(unregisterStub != null) {
            stubManager.stopReconnecting(unregisterStub);
            unregisterStub.destroy();
        }
View Full Code Here


                    logmon.log(BasicLevel.DEBUG, getName() + ": removes expired notification " + msg.from
                        + ", " + msg.not);
                  }
                }
              } else {
                messageOutputStream.writeMessage(new InetSocketAddress(server.getAddr(), server.getPort()),
                    msg, System.currentTimeMillis());
              }
            } catch (UnknownServerException exc) {
              this.logmon.log(BasicLevel.ERROR, this.getName() + ", can't send message: " + msg, exc);
              // Remove the message (see below), may be we have to post an error notification to sender.
View Full Code Here

    private SerializationContext _serContext = null;

    public RemoteMemoryMappedFile() {}

    public RemoteMemoryMappedFile(int port, String filePath, int pageSize, boolean alloc, boolean bigEndian) {
        this._sockAddr = new InetSocketAddress(NetUtils.getLocalHost(), port);
        this._filePath = filePath;
        this._pageSize = pageSize;
        this._bigEndian = bigEndian;
        this._maxBulkFetchSize = pageSize * (MemoryMappedDocumentTable.CACHED_PAGES / 4);
        this._rcvbuf = alloc ? ByteBuffer.allocateDirect(pageSize) : null;
View Full Code Here

        this._pageSize = in.readInt();
        this._maxBulkFetchSize = _pageSize * (MemoryMappedDocumentTable.CACHED_PAGES / 4);
        this._rcvbuf = ByteBuffer.allocateDirect(_pageSize);
        String host = IOUtils.readString(in);
        int port = in.readInt();
        this._sockAddr = new InetSocketAddress(host, port);
        this._filePath = IOUtils.readString(in);
        this._fileIdentifier = generateFileIdentifier(_sockAddr, _filePath);
    }
View Full Code Here

        // set to non blocking mode
        channel.configureBlocking(false);

        // Bind the server socket to the local host and port
        InetAddress host = InetAddress.getLocalHost();
        InetSocketAddress sockAddr = new InetSocketAddress(host, PORT);
        ServerSocket socket = channel.socket();
        //socket.setReuseAddress(true);
        socket.bind(sockAddr);

        // Register accepts on the server socket with the selector. This
View Full Code Here

        filterChainBuilder.addLast("protocol", protocolFiler);
        // and then a thread pool. REVIEWME
        filterChainBuilder.addLast("execFilter", new ExecutorFilter(ExecutorFactory.newCachedThreadPool("execFilter")));

        InetAddress host = InetAddress.getLocalHost();
        InetSocketAddress sockAddr = new InetSocketAddress(host, PORT);
        accepter.bind(sockAddr);

        if(JMX_MONITOR_ENABLED) {
            setupMonitor(accepter);
        }
View Full Code Here

    public RemoteVarSegments() {
        this._rbufPool = createPool();
    }

    public RemoteVarSegments(int port, String filePath, boolean alloc) {
        this._sockAddr = new InetSocketAddress(NetUtils.getLocalHost(), port);
        this._filePath = filePath;
        this._rbufPool = alloc ? createPool() : null;
    }
View Full Code Here

    }

    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        String host = IOUtils.readString(in);
        int port = in.readInt();
        this._sockAddr = new InetSocketAddress(host, port);
        this._filePath = IOUtils.readString(in);
    }
View Full Code Here

  static ODBCSocketListener odbcTransport;
 
  @BeforeClass public static void oneTimeSetup() throws Exception {
    SocketConfiguration config = new SocketConfiguration();
    config.setSSLConfiguration(new SSLConfiguration());
    addr = new InetSocketAddress(0);
    config.setBindAddress(addr.getHostName());
    config.setPortNumber(0);
    odbcTransport = new ODBCSocketListener(config, BufferManagerFactory.getStandaloneBufferManager(), 0, 100000);
   
    FakeServer server = new FakeServer();
View Full Code Here

   * @param timeout  the timeout value to be used in milliseconds.
   */
  public Socket createSocket(InetAddress addr, int port,
                             int timeout) throws IOException {
    Socket socket = new Socket();
    InetSocketAddress endpoint = new InetSocketAddress(addr, port);
    socket.connect(endpoint, timeout);

    return socket;
  }
View Full Code Here

TOP

Related Classes of java.net.InetSocketAddress

Copyright © 2018 www.massapicom. 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.