forked from restsql/restsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restSQL 0.7.4 fixes restsql#7 and adds Java API examples
- Loading branch information
Showing
17 changed files
with
495 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,51 @@ | ||
/* Copyright (c) restSQL Project Contributors. Licensed under MIT. */ | ||
package org.restsql.core; | ||
|
||
/** | ||
* Logs request for troubleshooting applications. The implementation logs requests to access, error and trace logs. | ||
* | ||
* @author Mark Sawers | ||
*/ | ||
public interface RequestLogger { | ||
/** | ||
* Adds sql statement. | ||
*/ | ||
public void addSql(final String sql); | ||
|
||
package org.restsql.core; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Logs request for troubleshooting applications. The implementation logs requests to access, error and trace logs. | ||
* | ||
* @author Mark Sawers | ||
*/ | ||
public interface RequestLogger { | ||
/** | ||
* Adds a SQL statement generated during request processing. Used by the framework. | ||
*/ | ||
public void addSql(final String sql); | ||
|
||
/** | ||
* Logs exceptional response without an exception. | ||
* Returns list of SQL statements generated during request processing. Intended for Java API clients. | ||
*/ | ||
public List<String> getSql(); | ||
|
||
/** | ||
* Logs exceptional response without an exception. Used by the service or Java API client. | ||
*/ | ||
public void log(final int responseCode); | ||
|
||
/** | ||
* Logs exceptional response with an exception. | ||
*/ | ||
public void log(final int responseCode, final Exception exception); | ||
|
||
/** | ||
* Logs normal response. | ||
*/ | ||
public void log(final String responseBody); | ||
} | ||
/** | ||
* Logs exceptional response with an exception. Used by the service or Java API client. | ||
*/ | ||
public void log(final int responseCode, final Exception exception); | ||
|
||
/** | ||
* Logs normal response. Used by the service or Java API client. | ||
*/ | ||
public void log(final String responseBody); | ||
|
||
/** | ||
* Sets request attributes. Used by the service or Java API clients. | ||
*/ | ||
public void setRequestAttributes(String client, String method, String uri); | ||
|
||
/** | ||
* Sets request attributes. Used by the service or Java API clients. | ||
* | ||
* @param client IP or host name | ||
* @param method HTTP method | ||
* @param uri request URI | ||
* @param requestBody request body, e.g. XML or JSON | ||
*/ | ||
public void setRequestAttributes(String client, String method, String uri, String requestBody); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.