CIFSPipeSession.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C) 2006-2010 Alfresco Software Limited.
  3. *
  4. * This file is part of Alfresco
  5. *
  6. * Alfresco is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Alfresco is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package org.alfresco.jlan.client;
  20. import org.alfresco.jlan.smb.PCShare;
  21. import org.alfresco.jlan.smb.SMBException;
  22. /**
  23. * SMB CIFS pipe session class
  24. *
  25. * <p>
  26. * Used when connecting to the special IPC$ named pipe on a remote server, that is used to access
  27. * DCE/RPC services on a remote server.
  28. *
  29. * @author gkspencer
  30. */
  31. public final class CIFSPipeSession extends IPCSession {
  32. /**
  33. * Class constructor
  34. *
  35. * @param shr Remote server details.
  36. * @param dialect SMB dialect that this session is using
  37. */
  38. protected CIFSPipeSession(PCShare shr, int dialect) {
  39. super(shr, dialect);
  40. }
  41. /**
  42. * Close this connection with the remote server.
  43. *
  44. * @exception java.io.IOException If an I/O error occurs.
  45. */
  46. public void CloseSession()
  47. throws java.io.IOException, SMBException {
  48. // Close the network session
  49. super.CloseSession();
  50. }
  51. /**
  52. * Send/receive an SMB transaction packet on this pipe session
  53. *
  54. * @param tpkt SMBTransPacket to send
  55. * @param rxpkt Packet to receive the reply into
  56. * @exception java.io.IOException If an I/O error occurs
  57. * @exception SMBException If an SMB error occurs
  58. */
  59. public void SendTransaction(TransPacket tpkt, TransPacket rxpkt)
  60. throws java.io.IOException, SMBException {
  61. // Exchange the SMB transaction with the server
  62. tpkt.ExchangeSMB(this, rxpkt);
  63. }
  64. }