Package de.fhkn.in.uce.stun.attribute

Examples of de.fhkn.in.uce.stun.attribute.ErrorCode


    @Override
    public Message buildFailureResponse(final STUNErrorCode errorNumber, final String reasonPhrase)
            throws UnsupportedEncodingException {
        return new MessageImpl(STUNMessageClass.FAILURE_RESPONSE, this.messageMethod, this.transactionID)
                .addAttribute(new ErrorCode(errorNumber, reasonPhrase));
    }
View Full Code Here


    private void waitForDeRegisterResponseMessage() throws Exception {
        final Message response = this.messageReader.readSTUNMessage(this.controlConnection.getInputStream());
        if (response.isSuccessResponse()) {
            this.logger.debug("Target successfully (de)registered"); //$NON-NLS-1$
        } else {
            final ErrorCode errorCode = response.getAttribute(ErrorCode.class);
            final String errorMessage = "Could not (de)register target: " + errorCode.getErrorNumber() + " " + errorCode.getReasonPhrase(); //$NON-NLS-1$ //$NON-NLS-2$
            throw new Exception(errorMessage);
        }
    }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.stun.attribute.ErrorCode

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.