public void handleRequest(ServerRequestEvent event)
	{
		
		JSONObject request = event.getRequest();
		
		try
		{
		
			if(!ChunkyTransactions.getInstance().getAPI().checkAPIKey(request.getString("APIKey")))
			{

				ChunkyTransactions.getInstance().getMessage().debug("Connection Refused!");
				DataOutputStream out = new DataOutputStream(this.getSocket().getOutputStream());
				out.writeBytes(APICodes.FORBIDDEN.toString());
				
			}
			
			try
			{

				ChunkyTransactions.getInstance().getMessage().debug("Connection Accepted");
				DataOutputStream out = new DataOutputStream(this.getSocket().getOutputStream());
				out.writeBytes(ChunkyTransactions.getInstance().getRequestManager().getRequest(request.getString("request"), "ServerRequest(" + this.getSocket().getInetAddress() + ")").perform(request).toString());
				
			}
			catch (JSONException e)
			{

				DataOutputStream out = new DataOutputStream(this.getSocket().getOutputStream());
				out.writeBytes(APICodes.INTERNAL_SERVER_ERROR.toString());
				ChunkyTransactions.getInstance().getMessage().spitError(e);
			
			}
			catch (NullRequestException e)
			{

				DataOutputStream out = new DataOutputStream(this.getSocket().getOutputStream());
				out.writeBytes(APICodes.NO_CONTENT.toString());
				ChunkyTransactions.getInstance().getMessage().spitError(e);

			}
			catch (UnknownRequestException e)
			{

				DataOutputStream out = new DataOutputStream(this.getSocket().getOutputStream());
				out.writeBytes(APICodes.NOT_FOUND.toString());
				ChunkyTransactions.getInstance().getMessage().spitError(e);
			
			}
			
			this.getSocket().close();
		
		}
		catch (IOException e)
		{

			ChunkyTransactions.getInstance().getMessage().spitError(e);
		
		}
		
	}