1. /*
  2. * @(#)IIOPAddressClosureImpl.java 1.6 04/06/21
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.impl.ior.iiop;
  8. import org.omg.CORBA.BAD_PARAM ;
  9. import org.omg.CORBA_2_3.portable.InputStream ;
  10. import org.omg.CORBA_2_3.portable.OutputStream ;
  11. import com.sun.corba.se.spi.orbutil.closure.Closure ;
  12. /**
  13. * @author
  14. */
  15. public final class IIOPAddressClosureImpl extends IIOPAddressBase
  16. {
  17. private Closure host;
  18. private Closure port;
  19. public IIOPAddressClosureImpl( Closure host, Closure port )
  20. {
  21. this.host = host ;
  22. this.port = port ;
  23. }
  24. public String getHost()
  25. {
  26. return (String)(host.evaluate()) ;
  27. }
  28. public int getPort()
  29. {
  30. Integer value = (Integer)(port.evaluate()) ;
  31. return value.intValue() ;
  32. }
  33. }