Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ensureTreeConnected (0.08 sec)

  1. src/main/java/jcifs/smb/SmbPipeHandleImpl.java

        public SmbNamedPipe getPipe() {
            return this.pipe;
        }
    
        @Override
        public SmbTreeHandleImpl ensureTreeConnected() throws CIFSException {
            if (this.treeHandle == null) {
                // extra acquire to keep the tree alive
                this.treeHandle = this.pipe.ensureTreeConnected();
            }
            return this.treeHandle.acquire();
        }
    
        public String getUncPath() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

            try (SmbTreeHandleImpl t1 = target.ensureTreeConnected(); SmbTreeHandleImpl t2 = target.ensureTreeConnected()) {
                assertSame(tree, t1);
                assertSame(tree, t2);
            }
    
            // Assert: pipe.ensureTreeConnected invoked once, acquire twice
            verify(pipe, times(1)).ensureTreeConnected();
            verify(tree, times(2)).acquire();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            SmbTreeHandleInternal t2 = handle.ensureTreeConnected();
    
            // Assert
            assertSame(tree, t1, "First acquire returns provided tree");
            assertSame(tree, t2, "Subsequent acquire returns same tree instance");
            verify(pipe, times(1)).ensureTreeConnected();
            verify(tree, times(2)).acquire();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

        }
    
        @Test
        @DisplayName("ensureTreeConnected delegates to handle")
        void ensureTreeConnected_delegates() throws Exception {
            // Verify ensureTreeConnected() delegates to SmbPipeHandleImpl
            SmbPipeInputStream stream = newStreamWithMinimalStubs(true);
            when(handle.ensureTreeConnected()).thenReturn(tree);
    
            SmbTreeHandleImpl result = stream.ensureTreeConnected();
            assertSame(tree, result);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbFileTest.java

            @Mock
            private SmbTreeHandleImpl mockTreeHandle;
    
            @BeforeEach
            void setUp() throws CIFSException {
                doReturn(mockTreeHandle).when(smbFile).ensureTreeConnected();
                when(mockTreeHandle.getConfig()).thenReturn(mockConfig);
            }
    
            @Test
            void testExists() throws SmbException, CIFSException {
                // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbEnumerationUtil.java

                    }
                    throw e;
                }
                try (SmbFile browser = (SmbFile) parent.resolve(addr.getHostAddress())) {
                    try (SmbTreeHandleImpl th = browser.ensureTreeConnected()) {
                        if (th.isSMB2()) {
                            throw new SmbUnsupportedOperationException();
                        }
                        return new NetServerFileEntryAdapterIterator(parent,
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbFileOutputStream.java

         *
         * @return the tree handle
         * @throws CIFSException if an error occurs connecting to the tree
         */
        protected SmbTreeHandleImpl ensureTreeConnected() throws CIFSException {
            return this.file.ensureTreeConnected();
        }
    
        /**
         * Writes len bytes from the specified byte array starting at
         * offset off to this file output stream.
         *
         * @param b
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbFileOutputStreamTest.java

            // Given
            // Mock the AutoCloseable tree handle behavior
            SmbTreeHandleImpl autoCloseableMockTreeHandle = mock(SmbTreeHandleImpl.class);
            when(mockFile.ensureTreeConnected()).thenReturn(autoCloseableMockTreeHandle);
            when(autoCloseableMockTreeHandle.isSMB2()).thenReturn(true);
            lenient().when(autoCloseableMockTreeHandle.getConfig()).thenReturn(mockConfig);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbFileInputStream.java

            this.file = file;
            this.unsharedFile = unshared;
            this.openFlags = openFlags;
            this.access = access;
            this.sharing = sharing;
    
            try (SmbTreeHandleInternal th = file.ensureTreeConnected()) {
                this.smb2 = th.isSMB2();
                if (file.getType() != SmbConstants.TYPE_NAMED_PIPE) {
                    try (SmbFileHandle h = ensureOpen()) {}
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbRandomAccessFile.java

            this.file = file;
            this.sharing = sharing;
            this.unsharedFile = unsharedFile;
    
            try (SmbTreeHandleInternal th = this.file.ensureTreeConnected()) {
                if (mode.equals("r")) {
                    this.openFlags = SmbConstants.O_CREAT | SmbConstants.O_RDONLY;
                    this.access = SmbConstants.FILE_READ_DATA;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 18.8K bytes
    - Viewed (0)
Back to top