public final synchronized void initialize ( String type , Properties configuration , Object flowOwner ) { if ( this . initialized ) { throw new FaxException ( "Fax bridge already initialized." ) ; } //set flag this . initialized = true ; //get configuration Map < String , String > map = new HashMap < String , String > ( ) ; SpiUtil . copyPropertiesToMap ( configuration , map ) ; this . bridgeConfiguration = new ConfigurationHolderImpl ( map ) ; //create fax client this . faxClient = FaxClientFactory . createFaxClient ( type , configuration ) ; //get logger LoggerManager loggerManager = LoggerManager . getInstance ( ) ; this . bridgeLogger = loggerManager . getLogger ( ) ; //create vendor policy this . vendorPolicy = this . createVendorPolicy ( ) ; if ( this . vendorPolicy == null ) { throw new FaxException ( "Unable to create vendor policy" ) ; } //initialize vendor policy this . vendorPolicy . initialize ( flowOwner ) ; if ( this . vendorPolicy instanceof FaxMonitorEventListener ) { this . faxClient . addFaxMonitorEventListener ( ( FaxMonitorEventListener ) this . vendorPolicy ) ; } //log fax client SPI information this . bridgeLogger . logDebug ( new Object [ ] { "Initializing fax bridge of type: " , this . getClass ( ) . getName ( ) , "\nProvider Information:\n" , this . getProvider ( ) , "\nFax Bridge Configuration:\n" , configuration , "\nVendor Policy Type: " , this . vendorPolicy . getClass ( ) . getName ( ) } , null ) ; //invoke hook this . initializeImpl ( ) ; }
This function initializes the fax bridge .