Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for getRemoteHostName (0.1 sec)

  1. src/test/java/jcifs/smb1/smb1/SmbConstantsTest.java

            jcifs.SmbTransport mock = mock(jcifs.SmbTransport.class);
            // Stub the getRemoteHostName method
            when(mock.getRemoteHostName()).thenReturn("test-host");
            // Verify the stubbing
            assertEquals("test-host", mock.getRemoteHostName());
            // Ensure that the mock was interacted with
            verify(mock).getRemoteHostName();
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/SmbTreeHandleTest.java

        }
    
        /**
         * Test for getRemoteHostName() method.
         * Verifies that the method returns the correct remote host name.
         */
        @Test
        void testGetRemoteHostName() {
            when(smbTreeHandle.getRemoteHostName()).thenReturn("test-server");
            assertEquals("test-server", smbTreeHandle.getRemoteHostName(), "Remote host name should be test-server");
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/SmbTransportTest.java

            when(smbTransport.getRemoteHostName()).thenReturn(hostName);
    
            // Act
            String result = smbTransport.getRemoteHostName();
    
            // Assert
            assertNotNull(result, "Remote host name should not be null");
            assertEquals(hostName, result, "Returned remote host name should be the mocked host name");
            verify(smbTransport).getRemoteHostName(); // Verify that the method was called
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.SmbTreeHandle#getRemoteHostName()
         */
        @Override
        public String getRemoteHostName() {
            try (SmbSessionImpl session = this.treeConnection.getSession(); SmbTransportImpl transport = session.getTransport()) {
                return transport.getRemoteHostName();
            }
        }
    
        /**
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbTreeHandleImplTest.java

        }
    
        @Test
        @DisplayName("getRemoteHostName returns transport value and closes resources")
        void getRemoteHostNameHappyPath() {
            // Ensures remote host name is sourced from transport and resources are closed
            when(transport.getRemoteHostName()).thenReturn("remote.example");
            String name = handle.getRemoteHostName();
            assertEquals("remote.example", name);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/SmbTransport.java

         * @return the connected address
         */
        Address getRemoteAddress();
    
        /**
         * Gets the host name of the remote SMB server.
         *
         * @return the connected host name
         */
        String getRemoteHostName();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/SmbTreeHandle.java

         * @return whether this tree handle uses SMB2+
         */
        boolean isSMB2();
    
        /**
         * Gets the remote host name for this tree connection
         * @return the remote host name
         */
        String getRemoteHostName();
    
        /**
         * Gets the tree type (share type such as disk, printer, pipe, etc.)
         * @return the tree type
         */
        int getTreeType();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/rdma/RdmaTransport.java

            delegate.close();
        }
    
        @Override
        public Address getRemoteAddress() {
            return delegate.getRemoteAddress();
        }
    
        @Override
        public String getRemoteHostName() {
            return delegate.getRemoteHostName();
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbTransportImplTest.java

        }
    
        @Test
        @DisplayName("Basic getters: address, hostName, inflight, sessions")
        void basicGetters() {
            assertEquals(address, transport.getRemoteAddress());
            assertNull(transport.getRemoteHostName(), "tconHostName starts null");
            assertEquals(0, transport.getInflightRequests());
            assertEquals(0, transport.getNumSessions());
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/DfsImpl.java

                    if (trans != null) {
                        // get domain referral
                        initial = trans.getDfsReferrals(tf.withAnonymousCredentials(), "", trans.getRemoteHostName(), authDomain, 0);
                    }
                    if (initial != null) {
                        final DfsReferralDataInternal start = initial.unwrap(DfsReferralDataInternal.class);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 29.7K bytes
    - Viewed (0)
Back to top