Package net.toddm.comm
The root package of the Comm Framework. This package provides a full-featured communications framework. Client code will primarily interact with the CommManager class.
-
Interface Summary Interface Description ConfigurationProvider Configuration providers implement this interface in order to expose configuration data to the comm framework.DependentWorkListener This interface is implemented by parties that are providing dependent work viaSubmittableWork.setDependentWork(SubmittableWork, DependentWorkListener).PriorityManagementProvider Priority management providers implement this interface in order to control priority queue functionality such as priority promotion and priority queue sorting.RetryPolicyProvider Retry policy providers implement this interface in order to control retry behavior such as if and when a request should be retried after a network failure, retry frequencies and limits, etc.SubmittableWork An interface implemented by the Comm Framework to publicly express units of work that can be submitted for processing.Work An interface implemented by the Comm Framework to publicly express units of work that are being managed by the framework. -
Class Summary Class Description Base64 For maximum compatibility across Java versions and various platforms (such as Android, etc.) this simple class provides base 64 functionality without relying on any external libraries or newer Java features.CachedResponseFuture This is a simple no-opFutureTaskimplementation that simply wraps and returns a cachedResponse.CommManager This is the main work horse of the communications framework.CommManager.Builder This is a factory class used for configuring and then creating instances ofCommManager.DefaultConfigurationProvider A simple implementation of theConfigurationProviderinterface that exposes a set of default configuration values used by the comm framework when a configuration provider is not supplied.DefaultPriorityManagmentProvider A simple implementation ofPriorityManagementProviderthat guards against starvation with simple timestamps based priority promotion.DefaultRetryPolicyProvider A simple implementation ofRetryPolicyProviderthat provides basic support for 503 and 202 based retries and error retries for a sub-set of exceptions where attempting the request again later seems to make sense.MapConfigurationProvider A simple implementation of theConfigurationProviderinterface that backs configuration data with an in-memory hash map.NoResponseFuture This is a simple no-opFutureTaskimplementation that simply returns a nullResponse.Priority A class that represents a priority for a unit ofWorkbeing managed by an instance ofCommManager.Request Represents a network request being managed by the Comm Framework.Response Represents a response resulting from an attempt to process aRequestinstance.RetryProfile Returned byRetryPolicyProviderimplementers to describe needed retry work (indicate if a retry should be attempted and how long to wait). -
Enum Summary Enum Description CacheBehavior An enumeration of caching behaviors supported by the Comm Manager.Priority.StartingPriority An enumeration of priority levels that calling code can claim for theirWorkinstancesRequest.RequestMethod HTTP request methods supported by the comm framework.Work.Status An set of possible states that work can be in -
Exception Summary Exception Description CommException An exception type thrown by the communications framework.ConfigurationException An exception type thrown by configuration providers.