1. /*
  2. * @(#)ClientSubcontract.java 1.30 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.internal.core;
  8. /**
  9. * The client subcontract adds quality-of-service behavior on the client-side.
  10. * It is also the delegate.
  11. */
  12. public interface ClientSubcontract {
  13. /**
  14. * Indicate whether to use local stub optimization for marshalling or not.
  15. */
  16. public boolean useLocalInvocation( org.omg.CORBA.Object self ) ;
  17. /**
  18. * Get the on-the-wire form of the object reference this
  19. * subcontract serves.
  20. */
  21. public IOR marshal();
  22. /**
  23. * Unmarshal subcontract specific information from the
  24. * IOR
  25. */
  26. public void unmarshal(IOR ior);
  27. /**
  28. * Create a ClientRequest instance.
  29. * For JavaIDL, this is invoked from the DII layer. For RMI/IIOP,
  30. * this is invoked from the delegate itself.
  31. */
  32. public ClientRequest createRequest(String method, boolean isOneWay);
  33. /**
  34. * Make an invocation.
  35. * For JavaIDL, this is invoked from the DII layer. For RMI/IIOP,
  36. * this is invoked from the delegate itself.
  37. */
  38. public ClientResponse invoke(ClientRequest request);
  39. /** Release the ClientResponse object after reply arguments have
  40. * been unmarshaled. If an exception was unmarshaled, it must be provided.
  41. * For JavaIDL, this is invoked from the DII layer. For RMI/IIOP,
  42. * this is invoked from the delegate itself.
  43. */
  44. public void releaseReply(ClientResponse resp, String method,
  45. Exception exception)
  46. throws org.omg.CORBA.WrongTransaction, org.omg.CORBA.SystemException;
  47. /**
  48. * Set the subcontract ID assigned by the ORB for this
  49. * class.
  50. */
  51. void setId(int id);
  52. int getId() ;
  53. /**
  54. * Set the ORB for this class.
  55. */
  56. void setOrb(ORB orb);
  57. /**
  58. * Unexport this object.
  59. */
  60. void unexport();
  61. }