- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for getAllByName (0.11 sec)
-
src/test/java/jcifs/smb1/UniAddressTest.java
void getAllByNameRejectsNullOrEmptyHostname() { assertThrows(UnknownHostException.class, () -> UniAddress.getAllByName("", false), "getAllByName should throw UnknownHostException for empty string"); assertThrows(UnknownHostException.class, () -> UniAddress.getAllByName(null, false), "getAllByName should throw UnknownHostException for null name"); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java
// getFirstAddress branch: host given and path non-root -> possibleNTDomain=false when(nsc.getAllByName(eq("server"), eq(false))).thenReturn(new Address[] { addr }); SmbResourceLocatorImpl workgroupLike = locator("smb://server/"); // path is "/" -> triggers possibleNTDomainOrWorkgroup true when(nsc.getAllByName(eq("server"), eq(true))).thenReturn(new Address[] { addr }); assertTrue(workgroupLike.isWorkgroup());Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.6K bytes - Viewed (0) -
src/test/java/jcifs/NameServiceClientTest.java
boolean possibleNTDomainOrWorkgroup = true; Address[] expectedAddresses = { mock(Address.class) }; when(nameServiceClient.getAllByName(hostname, possibleNTDomainOrWorkgroup)).thenReturn(expectedAddresses); // Act Address[] actualAddresses = nameServiceClient.getAllByName(hostname, possibleNTDomainOrWorkgroup); // Assert assertNotNull(actualAddresses);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.4K bytes - Viewed (0) -
src/main/java/jcifs/smb1/UniAddress.java
*/ public static UniAddress getByName(final String hostname, final boolean possibleNTDomainOrWorkgroup) throws UnknownHostException { final UniAddress[] addrs = UniAddress.getAllByName(hostname, possibleNTDomainOrWorkgroup); return addrs[0]; } /** * Resolves all addresses for the given hostname. * * @param hostname the hostname to resolveRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 17K bytes - Viewed (0) -
src/main/java/jcifs/netbios/NameServiceClientImpl.java
@Override public UniAddress getByName(final String hostname, final boolean possibleNTDomainOrWorkgroup) throws UnknownHostException { return getAllByName(hostname, possibleNTDomainOrWorkgroup)[0]; } @Override public UniAddress[] getAllByName(final String hostname, final boolean possibleNTDomainOrWorkgroup) throws UnknownHostException { if (hostname == null || hostname.length() == 0) {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 38.5K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbResourceLocatorImpl.java
} } else if (path.length() == 0 || path.equals("/")) { this.addresses = this.ctx.getNameServiceClient().getAllByName(host, true); } else { this.addresses = this.ctx.getNameServiceClient().getAllByName(host, false); }Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 23.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTransportPoolImplTest.java
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 }); // Set fail counts (addr1 has more failures, addr2 has fewer) pool.failCounts.put("10.0.0.1", 5);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 19.2K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NameServiceClientImplTest.java
} @Test @DisplayName("Should get all addresses by name") void testGetAllByName() throws UnknownHostException { // When Address[] addresses = nameServiceClient.getAllByName("localhost", false); // Then assertNotNull(addresses, "Should return addresses array"); assertTrue(addresses.length > 0, "Should return at least one address"); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 11K bytes - Viewed (0) -
src/main/java/jcifs/NameServiceClient.java
* @param possibleNTDomainOrWorkgroup if true, perform additional master browser lookup * @return found addresses * @throws UnknownHostException if the hostname cannot be resolved */ Address[] getAllByName(String hostname, boolean possibleNTDomainOrWorkgroup) throws UnknownHostException; /** * Lookup <code>hostname</code> and return it's <code>UniAddress</code>. If theRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 8.4K bytes - Viewed (0) -
src/main/java/jcifs/smb1/netbios/NbtAddress.java
* @throws UnknownHostException if there is an error resolving the name */ public static NbtAddress[] getAllByName(final String host, final int type, final String scope, final InetAddress svr) throws UnknownHostException { return CLIENT.getAllByName(new Name(host, type, scope), svr); } /** * Retrieve all addresses of a host by it's address. NetBIOS hosts canRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 31.7K bytes - Viewed (0)