Changeset d4c8e03 for apps/ministreaming


Ignore:
Timestamp:
Jun 28, 2013 12:12:37 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
eb5a23f
Parents:
46d13d2
Message:

remove static log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    r46d13d2 rd4c8e03  
    2525 */
    2626public class I2PSocketManagerFactory {
    27     private final static Log _log = new Log(I2PSocketManagerFactory.class);
    2827
    2928    public static final String PROP_MANAGER = "i2p.streaming.manager";
     
    3534     * I2CP router on the local machine on the default port (7654).
    3635     *
     36     * Blocks for a long time while the router builds tunnels.
     37     *
    3738     * @return the newly created socket manager, or null if there were errors
    3839     */
     
    4546     * I2CP router on the local machine on the default port (7654).
    4647     *
     48     * Blocks for a long time while the router builds tunnels.
     49     *
    4750     * @param opts I2CP options
    4851     * @return the newly created socket manager, or null if there were errors
     
    5457    /**
    5558     * Create a socket manager using a brand new destination connected to the
    56      * I2CP router on the specified host and port
     59     * I2CP router on the specified host and port.
     60     *
     61     * Blocks for a long time while the router builds tunnels.
    5762     *
    5863     * @param host I2CP host
     
    6772     * Create a socket manager using a brand new destination connected to the
    6873     * I2CP router on the given machine reachable through the given port.
     74     *
     75     * Blocks for a long time while the router builds tunnels.
    6976     *
    7077     * @param i2cpHost I2CP host
     
    8188            return createManager(in, i2cpHost, i2cpPort, opts);
    8289        } catch (IOException ioe) {
    83             _log.error("Error creating the destination for socket manager", ioe);
     90            getLog().error("Error creating the destination for socket manager", ioe);
    8491            return null;
    8592        } catch (I2PException ie) {
    86             _log.error("Error creating the destination for socket manager", ie);
     93            getLog().error("Error creating the destination for socket manager", ie);
    8794            return null;
    8895        }
     
    9299     * Create a socket manager using the destination loaded from the given private key
    93100     * stream and connected to the default I2CP host and port.
     101     *
     102     * Blocks for a long time while the router builds tunnels.
    94103     *
    95104     * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
     
    103112     * Create a socket manager using the destination loaded from the given private key
    104113     * stream and connected to the default I2CP host and port.
     114     *
     115     * Blocks for a long time while the router builds tunnels.
    105116     *
    106117     * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
     
    115126     * Create a socket manager using the destination loaded from the given private key
    116127     * stream and connected to the I2CP router on the specified machine on the given
    117      * port
     128     * port.
     129     *
     130     * Blocks for a long time while the router builds tunnels.
    118131     *
    119132     * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
     
    159172            return sockMgr;
    160173        } catch (I2PSessionException ise) {
    161             _log.error("Error creating session for socket manager", ise);
     174            getLog().error("Error creating session for socket manager", ise);
    162175            return null;
    163176        }
     
    174187            return mgr;
    175188        } catch (Throwable t) {
    176             _log.log(Log.CRIT, "Error loading " + classname, t);
     189            getLog().log(Log.CRIT, "Error loading " + classname, t);
    177190            throw new IllegalStateException(t);
    178191        }
     
    183196        return System.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
    184197    }
     198
    185199    private static int getPort() {
    186200        int i2cpPort = 7654;
     
    195209        return i2cpPort;
    196210    }
     211
     212    /** @since 0.9.7 */
     213    private static Log getLog() {
     214        return I2PAppContext.getGlobalContext().logManager().getLog(I2PSocketManagerFactory.class);
     215    }
    197216}
Note: See TracChangeset for help on using the changeset viewer.