/** * Constructor for the LateralTCPSender object. * <p> * @param lca * @throws IOException */ public LateralTCPSender( ITCPLateralCacheAttributes lca ) throws IOException { this.socketOpenTimeOut = lca.getOpenTimeOut(); this.socketSoTimeOut = lca.getSocketTimeOut(); String p1 = lca.getTcpServer(); if ( p1 == null ) { throw new IOException( "Invalid server (null)" ); } String h2 = p1.substring( 0, p1.indexOf( ":" ) ); int po = Integer.parseInt( p1.substring( p1.indexOf( ":" ) + 1 ) ); if ( log.isDebugEnabled() ) { log.debug( "h2 = " + h2 ); log.debug( "po = " + po ); } if ( h2.length() == 0 ) { throw new IOException( "Cannot connect to invalid address [" + h2 + ":" + po + "]" ); } init( h2, po ); }
/** * Constructor for the LateralTCPSender object. * <p> * @param lca * @throws IOException */ public LateralTCPSender( ITCPLateralCacheAttributes lca ) throws IOException { this.socketOpenTimeOut = lca.getOpenTimeOut(); this.socketSoTimeOut = lca.getSocketTimeOut(); String p1 = lca.getTcpServer(); if ( p1 == null ) { throw new IOException( "Invalid server (null)" ); } String h2 = p1.substring( 0, p1.indexOf( ":" ) ); int po = Integer.parseInt( p1.substring( p1.indexOf( ":" ) + 1 ) ); if ( log.isDebugEnabled() ) { log.debug( "h2 = " + h2 ); log.debug( "po = " + po ); } if ( h2.length() == 0 ) { throw new IOException( "Cannot connect to invalid address [" + h2 + ":" + po + "]" ); } init( h2, po ); }