1. /*
  2. * @(#)ServerGIOP.java 1.25 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. import java.net.InetAddress;
  9. import java.util.Collection;
  10. /**
  11. * ServerGIOP contains the server-side GIOP APIs.
  12. */
  13. public interface ServerGIOP
  14. {
  15. /**
  16. * Get the default end point, if you don't care about an end point
  17. * on a particular port.
  18. *
  19. * NOTE: If getDefaultEndpoint returns null, initEndpoints() needs
  20. * to be called after which getDefaultEndpoint will return
  21. * the default end point.
  22. */
  23. public EndPoint getDefaultEndpoint();
  24. /**
  25. * Initialize the vector of end points.
  26. */
  27. public void initEndpoints();
  28. /**
  29. * Get an EndPoint for the specified type, listenPort and local address.
  30. *
  31. * Type must be one which has a socket factory
  32. * (e.g., EndPoint.IIOP_CLEAR_TEXT default or user supplied "SSL").
  33. *
  34. * If listenPort == 0, a listening port will be assigned.
  35. *
  36. * If addr == null, InetAddress.getLocalHost() is used.
  37. *
  38. * If an EndPoint at the specified port/address does not exist,
  39. * then it will be created.
  40. */
  41. public EndPoint getEndpoint(String type, int listenPort, InetAddress addr);
  42. /**
  43. * Get an EndPoint for the bootstrap naming service, at the specified port.
  44. * If listenPort == 0 and this is the first time getBootstrapEndpoint was
  45. * invoked, then an EndPoint at the default port of 900 will be created.
  46. * If listenPort == 0 and this is not the first time getBootstrapEndpoint
  47. * was called, then the existing bootstrap EndPoint will be returned.
  48. */
  49. public EndPoint getBootstrapEndpoint(int port);
  50. /**
  51. * All incoming requests will be dispatched to the RequestHandler.
  52. */
  53. public void setRequestHandler(RequestHandler handler);
  54. /**
  55. * Return the RequestHandler.
  56. */
  57. public RequestHandler getRequestHandler();
  58. /**
  59. * Return port number for given type.
  60. */
  61. public int getServerPort (String socketType);
  62. /**
  63. * Return port number of locator for the given type.
  64. */
  65. public int getPersistentServerPort (String socketType);
  66. /**
  67. * Return number of server ports.
  68. */
  69. public Collection getServerEndpoints ();
  70. }