@@ -0,0 +1,2448 @@
+/**%0A * %0A */%0Apackage org.jitsi.turnserver.collectors;%0A%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0Aimport org.ice4j.ResponseCollector;%0Aimport org.ice4j.StunResponseEvent;%0Aimport org.ice4j.StunTimeoutEvent;%0Aimport org.ice4j.attribute.Attribute;%0Aimport org.ice4j.attribute.ErrorCodeAttribute;%0Aimport org.ice4j.message.Message;%0Aimport org.ice4j.stack.StunStack;%0A%0A/**%0A * The class that would be handling and responding to incoming CreatePermission response.%0A * %0A * @author Aakash Garg%0A */%0Apublic class CreatePermissionResponseCollector %0A%09%09implements ResponseCollector %0A%7B%0A    /**%0A    * The %3Ctt%3ELogger%3C/tt%3E used by the %3Ctt%3ECreatePermissionResponseCollector%3C/tt%3E class%0A    * and its instances for logging output.%0A    */%0A    private static final Logger logger %0A%09= Logger.getLogger(CreatePermissionResponseCollector.class.getName());%0A%0A    private final StunStack stunStack;%0A%0A    /**%0A     * Creates a new CreatePermissionResponseCollector%0A     * %0A     * @param stunStack%0A     */%0A    public CreatePermissionResponseCollector(StunStack stunStack) %0A    %7B%0A%09this.stunStack = stunStack;%0A    %7D%0A%0A    /* (non-Javadoc)%0A     * @see org.ice4j.ResponseCollector#processResponse(org.ice4j.StunResponseEvent)%0A     */%0A    @Override%0A    public void processResponse(StunResponseEvent evt) %0A    %7B%0A%09if (logger.isLoggable(Level.FINER))%0A%09%7B%0A%09%09logger.finer(%22Received response %22 + evt);%0A%09%7D%0A%09Message message = evt.getMessage();%0A%09if(message.getMessageType()==Message.ALLOCATE_ERROR_RESPONSE)%0A%09%7B%0A%09    ErrorCodeAttribute errorCodeAttribute = %0A%09%09    (ErrorCodeAttribute) message.getAttribute(Attribute.ERROR_CODE);%0A%09    switch(errorCodeAttribute.getErrorCode())%0A%09    %7B%0A%09    %09case ErrorCodeAttribute.BAD_REQUEST : %0A%09    %09    //logic for processing bad request error%0A%09    %09    break;%0A%09    %09case ErrorCodeAttribute.INSUFFICIENT_CAPACITY : %0A%09    %09    //logic for processing insufficient capacity error%0A%09    %09    break;%0A%09    %09case ErrorCodeAttribute.FORBIDDEN : %0A%09    %09    //logic for processing forbidden error code%0A%09    %09    break;%0A%09    %09default : %0A%09    %09    logger.finer(%22error : Received error response with error code %22 %0A%09    %09%09    %09%09+errorCodeAttribute.getErrorCode()%0A%09    %09%09    %09%09+ evt);%0A%09    %7D%0A%09%7D%0A%09else%0A%09%7B%0A%09    return;%0A%09%7D%0A%0A    %7D%0A%0A    /* (non-Javadoc)%0A     * @see org.ice4j.ResponseCollector#processTimeout(org.ice4j.StunTimeoutEvent)%0A     */%0A    @Override%0A    public void processTimeout(StunTimeoutEvent event) %0A    %7B%0A%09// TODO Auto-generated method stub%0A%0A    %7D%0A%0A%7D%0A

Add CreatePermissionResponseCollector