// create_protocol_address will allow iiop and ssliop only
IIOPAddress address = null;
IIOPAddress ssl_address = null;
if (protocol == Protocol.IIOP)
{
ProtocolAddressBase addr1 = createProtocolAddress(address_trim);
if (addr1 instanceof IIOPAddress)
{
address = (IIOPAddress)addr1;
address.configure(configuration);
}
if (ssl_port != null)
{
int colon_delim = address_trim.indexOf(":");
int port_delim = address_trim.indexOf(":", colon_delim+2);
if (port_delim > 0)
{
host_str = address_trim.substring(colon_delim+3, port_delim);
}
else
{
host_str = "";
}
ssl_address = new IIOPAddress(host_str,Integer.parseInt(ssl_port));
ssl_address.configure(configuration);
}
}
else if(protocol == Protocol.SSLIOP)
{
ProtocolAddressBase addr2 = createProtocolAddress(address_trim);
if (addr2 instanceof IIOPAddress)
{
ssl_address = (IIOPAddress)addr2;
ssl_address.configure(configuration);
}
// Set the protocol to IIOP for using IIOP Protocol Factory
protocol = Protocol.IIOP;
}
else
{
ProtocolAddressBase addr1 = createProtocolAddress(address_trim);
if (addr1 instanceof IIOPAddress)
{
address = (IIOPAddress)addr1;
address.configure(configuration);
}