Package de.fhkn.in.uce.plugininterface

Examples of de.fhkn.in.uce.plugininterface.NATFeatureRealization


        this.responseTimeoutInMillis = timeoutForResponseInSeconds * 1000;
    }

    @Override
    public NATFeatureRealization executeTest() {
        NATFeatureRealization result = NATFeatureRealization.DONT_CARE;
        Socket toStunServer = null;
        try {
            toStunServer = this.createConnectedSocket(this.primaryStunServerAddress);
            final Message responseTestI = this.executeTestI(toStunServer);
            if (responseTestI.hasAttribute(OtherAddress.class)) {
View Full Code Here


    }

    public static void main(String[] args) {
        final InetSocketAddress stunServerAddress = new InetSocketAddress("134.34.165.164", 3478);
        final DeterminingNATFeatureRealization filtering = new DeterminingTcpNatFiltering(55554, stunServerAddress, 15);
        final NATFeatureRealization filteringRealization = filtering.executeTest();
        System.out.println(filteringRealization.toString());
    }
View Full Code Here

        this.primaryStunServerAddress = primaryStunServerAddress;
    }

    @Override
    public NATFeatureRealization executeTest() {
        NATFeatureRealization result = NATFeatureRealization.DONT_CARE;
        try {
            final Message responseI = this.executeTestI(this.primaryStunServerAddress.getAddress(),
                    this.primaryStunServerAddress.getPort());
            final XorMappedAddress mappedAddressI = responseI.getAttribute(XorMappedAddress.class);
            final String localAddress = InetAddress.getLocalHost().getHostAddress();
View Full Code Here

    }

    public static void main(String[] args) {
        final InetSocketAddress stunServerAddress = new InetSocketAddress("134.34.165.164", 3478);
        final DeterminingNATFeatureRealization mapping = new DeterminingTcpNatMapping(55553, stunServerAddress);
        final NATFeatureRealization mappingRealization = mapping.executeTest();
        System.out.println(mappingRealization.toString());
    }
View Full Code Here

        this.bundle = ResourceBundle.getBundle(PROPERTY_STUN_SERVER);
    }

    @Override
    public NATBehavior investigateOwnNat(final int sourcePort) {
        final NATFeatureRealization mapping = this.investigateMappingBehavior(sourcePort);
        final NATFeatureRealization filtering = this.invetigateFilteringBehavior(sourcePort);
        final NATBehavior result = new NATBehavior(mapping, filtering);
        logger.debug("Current nat behavior: {}", result.toString()); //$NON-NLS-1$
        return result;
    }
View Full Code Here

    private InputStream getResourceAsStream(final String resourceName) {
        return Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName);
    }

    private NATSituation createNATBehaviorFromValues(final String[] values) {
        final NATFeatureRealization clientMapping = NATFeatureRealization.valueOf(values[0].toUpperCase());
        final NATFeatureRealization clientFiltering = NATFeatureRealization.valueOf(values[1].toUpperCase());
        final NATFeatureRealization serviceMapping = NATFeatureRealization.valueOf(values[2].toUpperCase());
        final NATFeatureRealization serviceFiltering = NATFeatureRealization.valueOf(values[3].toUpperCase());

        return new NATSituation(clientMapping, clientFiltering, serviceMapping, serviceFiltering);
    }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.plugininterface.NATFeatureRealization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.