| Home >> All |
| | konspire.client.* (40) | | konspire.common.* (46) | | konspire.common.log.* (14) |
| | konspire.server.* (9) | | konspire.server.database.* (4) |
Package Samples:
konspire.common
konspire.common.log
konspire.client
konspire.server
konspire.server.database
Classes:
LogProperties: LogProperties is a concrete class which manages all of the default start-up properties for logs. There is only one singleton instance of this class. The first time the application uses this class, it will attempt to read its properties from the file named [App].properties in the current directory, where [App] is the application name taken from the LogManager class instance. The following property tags and defaults will be used when reading the log property file: LogFileExtension = log LogFilePath = ./ LoggingLevel = 5 LoggingMechanism = UniqueFileLoggingMechanism LogFieldSeparator = | Any of the ...
CheckedMessageSocket: TwoWayMessage socket that periodically sends and receives pings to make sure other host is alive. Also supports timeouts on socket initialization and sending. NOTE: The Socket inside a CheckedMessageSocket should only be used via CheckedMessageSocket methods. The socket should not be retrieved and manipulated directly. The synchronization provided by the CheckedMessageSocket methods ensures that sends and receives of messages are atomic operations (thus, pings get interleaved with message sends and receives). If the Socket is accessed directly to send data bytes, behavior is undefined. Note that ...
StringPrintWriter: A PrintWriter that prints to a String . Automatic line flushing is enabled by default. Note that the implementation is very ugly right now in attempt to support Java1.1. In 1.1, the Writer is not accessible to subclasses because it is private. Thus, we can't replace the writer after calling the superclass constructor, nor can we simply call the superclass constructor and pass in our own member writer (because we can't access member variables before calling the superclass constructor). So, this implementation keeps a member PrintWriter and has wrapper functions for every PrintWriter function. This ...
AbstractFileLoggingMechanism: AbstractFileLoggingMechanism is an abstract class which defines the format and location of log files, so they all work consistently for the same application. The default file name where logs are created is: [Path][App][LogClass][date].[extn] where: [Path] = "c:\temp\" [App] = "App" [LogClass] = The Java Class name of the Log Class (only used for unique logs) [date] = today's date (only used for dated logs) [extn] = "log" The [App] default can be overridden by the application, it is taken from the LogManager class. The [Path] and [extn] defaults can be overridden by settings in a properties file, ...
MultiThreadLog: MultiThreadLog is an extension of the Log class to add information to each log entry specifying the thread that generated the entry. In a multi-threaded application, a particular log file may be intermixed with a number of entries from a number of threads. To make sense of what is going on in a particular thread, this type of log will prepend all entries with the name of the thread, so you can "grep" out a particular thread of interest. Like the Log class, this class could be extended to do application-specific behavior, or better yet you could create a class "wrapper" like AppLog to make instances ...
ServerList: Message sent from a Server containing a list of all known Server s. This message is sent to both Client s and Server s. This message also contain a correct address for the receiver. This is used in the case when the host requesting the live server list did not retrieve its local address correctly before sending the request (in the case of a host behind a firewall, for example). The server sending back the live server list will detect a discrepency between the address contained in the request (inserted by the requester) and the address attached to the socket and send the requester the correct address ...
Log: Log is the base class which defines all of the logging constants and implements any general logging responsibilities. It dispatches the actual logging information over to a concrete subclass of AbstractLoggingMechanism to do the work of writing out the log information. This class could be extended to do application-specific behavior, or better yet you could create a class "wrapper" like AppLog to make instances well-known Singletons with handy static/class methods.
AbstractLoggingMechanism: AbstractLoggingMechanism is an abstract class which serves to define a hierarchy of different logging mechanisms. Subclasses of this class will implement the different mechanisms defined herein. The main responsibility of this class hierarchy is to offload the implementation work for differences in logging streams for different mechanisms. For example, the standard error stream is a very different implementation than a shared local output file.
AppLog: AppLog wraps the Log class to do application-general logging. It provides a singleton accessor, along with lots of handy class method {static} accessors. AppLog should be your general application log to write out events of a non-specific nature. You can create additional special-purpose logs (for example, DbLog to log database events) by copying this class and creating your own handy class method accessors.
RemoteLogManagerImpl: RemoteLogManagerImpl is a concrete class which provides an RMI interface to the LogManager class so that RMI clients can remote control the application's logs. This class houses the default RMI registration in its main() method, binding with a name of (ApplicationName)RemoteLogManager, where (ApplicationName) is the name of the application as recorded in the property file or overridden in the LogManager class.
NamedErrorHandlingThread: Thread class that catches Throwable s thrown by the run methods of all subclasses. Throwables are reported to the error handling framework. All subclassing Thread s are required to pass in a name for themselves. Note that all constructors require a non-null name to be passed in. Thus, other Thread constructors are not overridden.
ServerGoingDown: Message containing information about a dying (or dead) Server . This message is sent by a Server that is about to go down, and the receiving Server propagates the message. This message is also propagated by a Server that discovers that another Server is no longer responding (socket connection broken, etc.).
FileHost: Message containing a description of a network host that is sharing files. Contains the host address and a collection of FileDescriptors , one for each file that the host is sharing. Includes functionality for building the collection of FileDescriptors from a shared files directory with subdirectories.
UniqueFileLoggingMechanism: This logging mechanism is the simplest implementation of a file logging mechanism. It is designed to have one log file per log, with the name of the log as part of the file name. It doesn't do anything fancy like rolling over to a new file when a date changes, it appends all messages to the same file name if already present.
ErrorHandlingThread: Thread class that catches Throwable s thrown by the run methods of all subclasses. Throwables are reported to the error handling framework. Note that all constructors simply wrap Thread constructors, so no explicit Javadoc is included for them.
ClientRequestConnect: Message from a Client to a Server requesting one of the Server 's dedicated sockets. If the Client connection is accepted, the Client can then use the dedicated socket to send service requests and receive responses.
ToClientMessage: Abstract superclass for all messages sent from a Server to a Client . Contains information about global system state so that Client will be updated with this information whenever it receives a message from a Server .
SharedDatedFileLoggingMechanism: This logging mechanism adds today's date to the shared log file name, and also rolls logging over to a new file when dates change (the first new string logged on a new date causes the current log file to close and a new log file to be opened with today's date).
UniqueDatedFileLoggingMechanism: This logging mechanism adds today's date to the log file name, and also rolls logging over to a new file when dates change (the first new string logged on a new date causes the current log file to close and a new log file to be opened with today's date).
Vector: Extends Java 1.1 Vector to provide some 1.2 functionality. Will be replaced permanently by the 1.2 Vector implementation (or java.util.ArrayList) once every konspire target platform has access to Java 1.2.
ListChoiceEvent: Event generated by a ClickableJList when a group of its items are chosen (for example, double clicked ). Note that this class only uses the even pattern and doesn't actually subclasse java.awt.event .
StringTreeFileDescriptor: Descriptor of a file indexed by a StringTree . This wrapper allows the node indexing the FileDescriptor to be accessed directly, facilitating the removal of a file from the tree.
StandardErrLoggingMechanism: This logging mechanism logs errors to the System.err output stream. This is the default logging mechanism. As such, we don't want to cloud it up with notification messages, like those in the file logs.
MessageSender: Class for sending reliable messages on non-maintained sockets. Each send method call creates a Socket , sends the Message , and then closes the Socket .
BaseTwoUnitsPrefixFormat: Converts values and units to values in units with order of magnitude prefixes (for units that use base-2 for orders of magnitude). Conforms to the IEEE proposal for base-2 unit prefixes.
| Home | Contact Us | Privacy Policy | Terms of Service |