Package de.fhkn.in.uce.plugininterface.message

Examples of de.fhkn.in.uce.plugininterface.message.NATAttributeTypeDecoder


        final Message requestMessage = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.NAT_REQUEST);
        requestMessage.addAttribute(new Username(targetId));
        requestMessage.writeTo(this.mediatorConnection.getControlConnection().getOutputStream());
        final MessageReader messageReader = MessageReader
                .createMessageReaderWithCustomAttributeTypeDecoder(new NATAttributeTypeDecoder());
        final Message response = messageReader.readSTUNMessage(this.mediatorConnection.getControlConnection()
                .getInputStream());
        if (response.hasAttribute(NATBehavior.class)) {
            result = response.getAttribute(NATBehavior.class);
        }
View Full Code Here


        final Message requestMessage = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.SUPPORTED_TRAV_TECHS_REQUEST);
        requestMessage.addAttribute(new Username(targetId));
        requestMessage.writeTo(this.mediatorConnection.getControlConnection().getOutputStream());
        final MessageReader messageReader = MessageReader
                .createMessageReaderWithCustomAttributeTypeDecoder(new NATAttributeTypeDecoder());
        final Message response = messageReader.readSTUNMessage(this.mediatorConnection.getControlConnection()
                .getInputStream());
        if (response.hasAttribute(NATTraversalTechniqueAttribute.class)) {
            for (final NATTraversalTechniqueAttribute ntta : response
                    .getAttributes(NATTraversalTechniqueAttribute.class)) {
View Full Code Here

        @Override
        public Message call() throws Exception {
            Message result = null;
            final MessageReader messageReader = MessageReader
                    .createMessageReaderWithCustomAttributeTypeDecoder(new NATAttributeTypeDecoder());
            UnsecureTargetSideConnectionEstablishment.this.logger.debug(
                    "waiting for connection request message from {}", this.controlConnection.toString()); //$NON-NLS-1$
            while (this.controlConnection.isConnected()) {
                final Message inMessage = messageReader.readSTUNMessage(this.controlConnection.getInputStream());
                if (inMessage.isMethod(STUNMessageMethod.CONNECTION_REQUEST)) {
View Full Code Here

    private NATAttributeTypeDecoder decoder;
    private final int encoding = 0x1000;

    @Before
    public void setUp() {
        this.decoder = new NATAttributeTypeDecoder();
    }
View Full Code Here

     *            the socket to the peer
     * @throws IOException
     */
    public HandleMessageTask(final Socket socket) throws IOException {
        this.messageReader = MessageReader
                .createMessageReaderWithCustomAttributeTypeDecoder(new NATAttributeTypeDecoder());
        this.messageWriter = new MessageWriter(socket.getOutputStream());
        this.socket = socket;
        this.registerMessageHandler = new DefaultRegisterHandling();
        this.deregisterMessageHandler = new DefaultDeregisterHandling();
        this.keepAliveMessageHandler = new DefaultKeepAliveHandling();
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.plugininterface.message.NATAttributeTypeDecoder

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.