1 7 8 package com.sun.corba.se.impl.ior.iiop; 9 10 import org.omg.CORBA.BAD_PARAM ; 11 12 import org.omg.CORBA_2_3.portable.InputStream ; 13 import org.omg.CORBA_2_3.portable.OutputStream ; 14 15 import com.sun.corba.se.spi.orb.ORB ; 16 17 import com.sun.corba.se.spi.logging.CORBALogDomains ; 18 19 import com.sun.corba.se.impl.logging.IORSystemException ; 20 21 24 public final class IIOPAddressImpl extends IIOPAddressBase 25 { 26 private ORB orb ; 27 private IORSystemException wrapper ; 28 private String host; 29 private int port; 30 31 public IIOPAddressImpl( ORB orb, String host, int port ) 32 { 33 this.orb = orb ; 34 wrapper = IORSystemException.get( orb, 35 CORBALogDomains.OA_IOR ) ; 36 37 if ((port < 0) || (port > 65535)) 38 throw wrapper.badIiopAddressPort( new Integer (port)) ; 39 40 this.host = host ; 41 this.port = port ; 42 } 43 44 public IIOPAddressImpl( InputStream is ) 45 { 46 host = is.read_string() ; 47 short thePort = is.read_short() ; 48 port = shortToInt( thePort ) ; 49 } 50 51 public String getHost() 52 { 53 return host ; 54 } 55 56 public int getPort() 57 { 58 return port ; 59 } 60 } 61 | Popular Tags |