summaryrefslogtreecommitdiffstats
blob: acd289b2e084a8ddcc2717de6fbe0f031f50fa5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (c) 2011 Isode Limited, London, England.
 * All rights reserved.
 */
package com.isode.stroke.network;

import com.isode.stroke.eventloop.EventLoop;

public class JavaNetworkFactories implements NetworkFactories {

    public JavaNetworkFactories(EventLoop eventLoop) {
        eventLoop_ = eventLoop;
        timers_ = new JavaTimerFactory(eventLoop_);
        connections_ = new JavaConnectionFactory(eventLoop_);
        dns_ = new PlatformDomainNameResolver(eventLoop_);
    }

    public TimerFactory getTimerFactory() {
        return timers_;
    }

    public ConnectionFactory getConnectionFactory() {
        return connections_;
    }

    public DomainNameResolver getDomainNameResolver() {
        return dns_;
    }
    private final EventLoop eventLoop_;
    private final JavaTimerFactory timers_;
    private final JavaConnectionFactory connections_;
    private final PlatformDomainNameResolver dns_;
}