}
private Transport getTransport( Entry transportEntry ) throws Exception
{
Transport transport = null;
EntryAttribute ocAttr = transportEntry.get( "objectClass" );
if ( ocAttr.contains( "ads-tcpTransport" ) )
{
transport = new TcpTransport();
}
else if ( ocAttr.contains( "ads-udpTransport" ) )
{
transport = new UdpTransport();
}
transport.setPort( getInt( "ads-systemPort", transportEntry ) );
EntryAttribute addressAttr = transportEntry.get( "ads-transportAddress" );
if ( addressAttr != null )
{
transport.setAddress( addressAttr.getString() );
}
else
{
transport.setAddress( "0.0.0.0" );
}
EntryAttribute backlogAttr = transportEntry.get( "ads-transportBacklog" );
if ( backlogAttr != null )
{
transport.setBackLog( Integer.parseInt( backlogAttr.getString() ) );
}
EntryAttribute sslAttr = transportEntry.get( "ads-transportEnableSSL" );
if ( sslAttr != null )
{
transport.setEnableSSL( Boolean.parseBoolean( sslAttr.getString() ) );
}
EntryAttribute nbThreadsAttr = transportEntry.get( "ads-transportNbThreads" );
if ( nbThreadsAttr != null )
{
transport.setNbThreads( Integer.parseInt( nbThreadsAttr.getString() ) );
}
return transport;
}