Class UnknownApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.iizix.jetty.UnknownApplicationException
- All Implemented Interfaces:
Serializable
The refusal of an external page asked for an application this server does not have: the "app" of the query names no registered application (CC-FIX-SERVER-THEME-WALK, AW-5 of CC-ANDROID-APPS-WALK).
CustomDefaultServlet answers it with status 404 and, for a .json target, a small JSON body that names the program, so that an iiziRun tells its user that the application is not on this server instead of "Remote party is not an iiziServer instance", and logs ONE WARNING line without a stack trace: a launcher asking for an application that is not here is not a failure of the server, which answered status 500 "Server error" and logged SEVERE with a full stack trace until then.The exception carries the application ID for the log line, the program's name for the body and, for the port gate, the reason the log line adds (an application not served on the port is answered as an unknown one, CC-FIX-APP-DEFINITIONS D-9); the body never carries the ID or the reason (the launcher names the application it asked for itself, and nothing of a request reaches a client in a failure reply, CC-FIX-APPJSON-EMPTY-200).
- Author:
- Christopher Mindus
- See Also:
Constructor Summary
ConstructorsConstructorDescriptionUnknownApplicationException(String appID, String program) Constructor for an application that is not registered.UnknownApplicationException(String appID, String program, String reason) Constructor with the reason the log line carries.Method Summary
Modifier and TypeMethodDescriptiongetAppID()Gets the application ID asked for.Gets the application ID as ONE log line can carry it: every control character (a line break among them) replaced by '?', and at most 200 characters.Gets the program answering.Gets the reason for the log line.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Details
UnknownApplicationException
UnknownApplicationException
Constructor with the reason the log line carries.- Parameters:
appID- The application ID asked for, null for none.program- The program answering, e.g. "iiziServer", the "program" member of the JSON body.reason- The reason for the log, null for none: the client is never told it.
Method Details
getReason
getAppID
getProgram
getLoggableAppID
Gets the application ID as ONE log line can carry it: every control character (a line break among them) replaced by '?', and at most 200 characters.- Returns:
- The ID for the log.