Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for getRemoteHostName (0.68 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  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();
        }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  2. 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();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  3. 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();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 2.6K bytes
    - Click Count (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}
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 11.1K bytes
    - Click Count (0)
  5. 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");
        }
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  6. 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);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.4K bytes
    - Click Count (0)
  7. 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
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.6K bytes
    - Click Count (0)
  8. src/main/java/jcifs/smb/SmbTransportImpl.java

            return getContext().getConfig().getResponseTimeout();
        }
    
        @Override
        public Address getRemoteAddress() {
            return this.address;
        }
    
        @Override
        public String getRemoteHostName() {
            return this.tconHostName;
        }
    
        /**
         *
         * @return number of sessions on this transport
         */
        public int getNumSessions() {
            return this.sessions.size();
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 69.8K bytes
    - Click Count (0)
  9. src/main/java/jcifs/smb/SmbTreeConnection.java

                if (isConnected()) {
                    try (SmbTransportImpl transport = session.getTransport()) {
                        if (transport.isDisconnected() || transport.getRemoteHostName() == null) {
                            /*
                             * Tree/session thinks it is connected but transport disconnected
                             * under it, reset tree to reflect the truth.
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 30.4K bytes
    - Click Count (1)
Back to Top