Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for getHostAddress (0.06 sec)

  1. src/test/java/jcifs/netbios/UniAddressTest.java

                when(mockInetAddress.getHostAddress()).thenReturn("1.2.3.4");
                UniAddress uniAddress = new UniAddress(mockInetAddress);
                assertEquals("1.2.3.4", uniAddress.getHostAddress());
            }
    
            @Test
            void shouldReturnNbtAddressHostAddressWhenWrappedIsNbtAddress() {
                when(mockNbtAddress.getHostAddress()).thenReturn("5.6.7.8");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/AddressTest.java

        }
    
        @Test
        @DisplayName("getHostAddress should return valid IP address string")
        void testGetHostAddressContract() {
            // Given
            String expectedAddress = "192.168.1.100";
            when(mockAddress.getHostAddress()).thenReturn(expectedAddress);
    
            // When
            String hostAddress = mockAddress.getHostAddress();
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/witness/WitnessRpcClient.java

                this.rpcHandle = DcerpcHandle.getHandle(rpcUrl, context);
                this.rpcHandle.bind();
                this.connected = true;
    
                log.debug("Connected to witness service at {}", serverAddress.getHostAddress());
            } catch (Exception e) {
                throw new IOException("Failed to connect to witness service", e);
            }
        }
    
        /**
         * Builds the RPC URL for the witness service.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:12:28 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/netbios/UniAddress.java

         *
         * @return the ip address
         */
        @Override
        public String getHostAddress() {
            if (this.addr instanceof NbtAddress) {
                return ((NbtAddress) this.addr).getHostAddress();
            }
            return ((InetAddress) this.addr).getHostAddress();
        }
    
        /**
         * {@inheritDoc}
         *
         * @throws UnknownHostException if the host cannot be resolved
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/SmbTransport.java

                /* These Socket constructors attempt to connect before SO_TIMEOUT can be applied
                if (localAddr == null) {
                    socket = new Socket( address.getHostAddress(), 139 );
                } else {
                    socket = new Socket( address.getHostAddress(), 139, localAddr, localPort );
                }
                socket.setSoTimeout( SO_TIMEOUT );
                */
    
                socket = new Socket();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 31.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTransportPoolImplTest.java

            // Given: Multiple addresses with different fail counts
            Address addr1 = mock(Address.class);
            when(addr1.getHostAddress()).thenReturn("10.0.0.1");
    
            Address addr2 = mock(Address.class);
            when(addr2.getHostAddress()).thenReturn("10.0.0.2");
    
            when(nameSvc.getAllByName(eq("test.server"), eq(true))).thenReturn(new Address[] { addr1, addr2 });
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 19.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/netbios/NbtAddress.java

             * an IP address as the tconHostName which is the principal
             * use of this method.
             */
            if (this.hostName.isUnknown()) {
                return getHostAddress();
            }
            return this.hostName.name;
        }
    
        @Override
        public NetbiosName getName() {
            return this.hostName;
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/UniAddressTest.java

        }
    
        @Test
        void getHostAddressDelegatesToWrappedInetAddress() {
            InetAddress dummy = mock(InetAddress.class);
            when(dummy.getHostAddress()).thenReturn("192.0.2.1");
            UniAddress ua = new UniAddress(dummy);
            assertEquals("192.0.2.1", ua.getHostAddress(), "should forward hostAddress to underlying InetAddress");
        }
    
        @Test
        void toStringDelegatesToUnderlyingAddress() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTransportPoolImpl.java

                throw new UnknownHostException(name);
            }
    
            Arrays.sort(addrs, (o1, o2) -> {
                Integer fail1 = SmbTransportPoolImpl.this.failCounts.get(o1.getHostAddress());
                Integer fail2 = SmbTransportPoolImpl.this.failCounts.get(o2.getHostAddress());
                if (fail1 == null) {
                    fail1 = 0;
                }
                if (fail2 == null) {
                    fail2 = 0;
                }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 33.4K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/netbios/NbtAddress.java

        public InetAddress getInetAddress() throws UnknownHostException {
            return InetAddress.getByName(getHostAddress());
        }
    
        /**
         * Returns this IP adress as a {@link java.lang.String} in the form "%d.%d.%d.%d".
         *
         * @return the IP address string
         */
    
        public String getHostAddress() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 31.7K bytes
    - Viewed (0)
Back to top