Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for SmbSessionImpl (0.07 sec)

  1. src/test/java/jcifs/smb/SmbSessionImplTest.java

        @Mock
        private Credentials credentials;
        @Mock
        private CredentialsInternal credentialsInternal;
        @Mock
        private SmbTransportImpl transport;
    
        private SmbSessionImpl newSession() {
            return new SmbSessionImpl(cifsContext, "server.example", "EXAMPLE", transport);
        }
    
        @BeforeEach
        void setup() {
            // Base context configuration - always needed
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java

         * Test that concurrent tree operations are thread-safe with CopyOnWriteArrayList.
         */
        @Test
        public void testConcurrentTreeOperationsThreadSafe() throws Exception {
            // Given
            SmbSessionImpl session = new SmbSessionImpl(mockContext, "testhost", "testdomain", mockTransport);
    
            int threadCount = 10;
            int opsPerThread = 100;
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

        public int getSendBufferSize() throws SmbException {
            try (SmbSessionImpl session = this.treeConnection.getSession(); SmbTransportImpl transport = session.getTransport()) {
                return transport.getNegotiateResponse().getSendBufferSize();
            }
        }
    
        @Override
        public int getReceiveBufferSize() throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbTreeImpl.java

         * 2 - connected
         * 3 - disconnecting
         */
        private final AtomicInteger connectionState = new AtomicInteger();
    
        private final String share;
        private final String service0;
        private final SmbSessionImpl session;
    
        private volatile int tid = -1;
        private volatile String service = "?????";
        private volatile boolean inDfs, inDomainDfs;
        private volatile long treeNum; // used by SmbFile.isOpen
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbTreeConnection.java

                log.warn("Tree connection was not properly released " + this);
            }
        }
    
        synchronized void disconnect(final boolean inError) {
            try (SmbSessionImpl session = getSession()) {
                if (session == null) {
                    return;
                }
                try (SmbTransportImpl transport = session.getTransport()) {
                    synchronized (transport) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 30.4K bytes
    - Viewed (1)
  6. src/test/java/jcifs/smb/SmbTransportImplTest.java

            // Act: create new session (happy path)
            SmbSessionImpl s1 = transport.getSmbSession(ctx);
            assertNotNull(s1);
            assertEquals(1, transport.getNumSessions());
            s1.close();
    
            // Act: request again with same context -> reuse existing
            SmbSessionImpl s2 = transport.getSmbSession(ctx);
            assertNotNull(s2);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbPipeHandleImplTest.java

        void testGetSessionKey() throws CIFSException {
            when(pipe.ensureTreeConnected()).thenReturn(tree);
            when(tree.acquire()).thenReturn(tree);
            SmbSessionImpl session = mock(SmbSessionImpl.class);
            when(tree.getSession()).thenReturn(session);
            when(session.getSessionKey()).thenReturn(new byte[] { 1, 2, 3 });
    
            byte[] key = target.getSessionKey();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/CriticalPerformanceTest.java

            SmbTransportImpl mockTransport = Mockito.mock(SmbTransportImpl.class);
            Mockito.when(mockTransport.acquire()).thenReturn(mockTransport);
    
            SmbSessionImpl session = new SmbSessionImpl(mockContext, "testhost", "testdomain", mockTransport);
    
            int threadCount = 10;
            int operationsPerThread = 200;
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbTreeConnectionTest.java

        void connect_whenAlreadyConnected_returnsHandle() throws Exception {
            SmbTreeConnection c = spy(newConn());
            SmbTreeImpl tree = mock(SmbTreeImpl.class);
            SmbSessionImpl session = mock(SmbSessionImpl.class);
            SmbTransportImpl transport = mock(SmbTransportImpl.class);
    
            when(tree.isConnected()).thenReturn(true);
            when(tree.getSession()).thenReturn(session);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 13K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbPipeHandleImpl.java

         *
         * @see jcifs.smb.SmbPipeHandleInternal#getSessionKey()
         */
        @Override
        public byte[] getSessionKey() throws CIFSException {
            try (SmbTreeHandleImpl th = ensureTreeConnected(); SmbSessionImpl sess = th.getSession()) {
                return sess.getSessionKey();
            }
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.SmbPipeHandle#isStale()
         */
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 10.2K bytes
    - Viewed (0)
Back to top