Package de.fhkn.in.uce.directconnection.message

Examples of de.fhkn.in.uce.directconnection.message.DirectconnectionAttribute


        return this.timoutInSeconds * 1000L;
    }

    @Override
    public NATTraversalTechniqueAttribute getAttribute() {
        return new DirectconnectionAttribute();
    }
View Full Code Here


    }

    private void sendConnectionRequest(final String targetId, final Socket controlConnection) throws Exception {
        final Message requestConnectionMessage = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.CONNECTION_REQUEST);
        requestConnectionMessage.addAttribute(new DirectconnectionAttribute());
        requestConnectionMessage.addAttribute(new Username(targetId));
        requestConnectionMessage.writeTo(controlConnection.getOutputStream());
    }
View Full Code Here

    }

    private void sendResponseForTargetIsReady(final Socket controlConnection, final Message connectionRequestMessage)
            throws IOException {
        final Message response = connectionRequestMessage.buildSuccessResponse();
        response.addAttribute(new DirectconnectionAttribute());
        response.writeTo(controlConnection.getOutputStream());
    }
View Full Code Here

    private void callTarget(final UserData target, final Message connectionRequestFromSource) throws Exception {
        logger.debug("Calling target {}", target.getUserId()); //$NON-NLS-1$
        final Socket toTarget = target.getSocketToUser();
        final Message connectionRequest = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.CONNECTION_REQUEST, connectionRequestFromSource.getHeader().getTransactionId());
        connectionRequest.addAttribute(new DirectconnectionAttribute());
        logger.debug("Forwarding connection request to target"); //$NON-NLS-1$
        connectionRequest.writeTo(toTarget.getOutputStream());
    }
View Full Code Here

        failureResponse.writeTo(out);
    }

    @Override
    public NATTraversalTechniqueAttribute getAttributeForTraversalTechnique() {
        return new DirectconnectionAttribute();
    }
View Full Code Here

        assertEquals(expectedResult, actualResult);
    }

    @Test
    public void testGetEncoded() {
        NATTraversalTechniqueAttribute attr = new DirectconnectionAttribute();
        assertEquals(attr, this.metaData.getAttribute());
    }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.directconnection.message.DirectconnectionAttribute

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.