summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoperation.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/_httpoperation.h')
-rw-r--r--indra/llcorehttp/_httpoperation.h222
1 files changed, 111 insertions, 111 deletions
diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h
index b07ef76d49..ff7efe60e9 100644
--- a/indra/llcorehttp/_httpoperation.h
+++ b/indra/llcorehttp/_httpoperation.h
@@ -24,8 +24,8 @@
* $/LicenseInfo$
*/
-#ifndef _LLCORE_HTTP_OPERATION_H_
-#define _LLCORE_HTTP_OPERATION_H_
+#ifndef _LLCORE_HTTP_OPERATION_H_
+#define _LLCORE_HTTP_OPERATION_H_
#include "httpcommon.h"
@@ -76,82 +76,82 @@ public:
typedef std::weak_ptr<HttpOperation> wptr_t;
typedef std::shared_ptr<HttpReplyQueue> HttpReplyQueuePtr_t;
- /// Threading: called by consumer thread.
- HttpOperation();
+ /// Threading: called by consumer thread.
+ HttpOperation();
- /// Threading: called by any thread.
- virtual ~HttpOperation(); // Use release()
+ /// Threading: called by any thread.
+ virtual ~HttpOperation(); // Use release()
public:
- /// Register a reply queue and a handler for completion notifications.
- ///
- /// Invokers of operations that want to receive notification that an
- /// operation has been completed do so by binding a reply queue and
- /// a handler object to the request.
- ///
- /// @param reply_queue Pointer to the reply queue where completion
- /// notifications are to be queued (typically
- /// by addAsReply()). This will typically be
- /// the reply queue referenced by the request
- /// object. This method will increment the
- /// refcount on the queue holding the queue
- /// until delivery is complete. Using a reply_queue
- /// even if the handler is NULL has some benefits
- /// for memory deallocation by keeping it in the
- /// originating thread.
- ///
- /// @param handler Possibly NULL pointer to a non-refcounted
- //// handler object to be invoked (onCompleted)
- /// when the operation is finished. Note that
- /// the handler object is never dereferenced
- /// by the worker thread. This is passible data
- /// until notification is performed.
- ///
- /// Threading: called by consumer thread.
- ///
- void setReplyPath(HttpReplyQueuePtr_t reply_queue,
- HttpHandler::ptr_t handler);
-
- /// The three possible staging steps in an operation's lifecycle.
- /// Asynchronous requests like HTTP operations move from the
- /// request queue to the ready queue via stageFromRequest. Then
- /// from the ready queue to the active queue by stageFromReady. And
- /// when complete, to the reply queue via stageFromActive and the
- /// addAsReply utility.
- ///
- /// Immediate mode operations (everything else) move from the
- /// request queue to the reply queue directly via stageFromRequest
- /// and addAsReply with no existence on the ready or active queues.
- ///
- /// These methods will take out a reference count on the request,
- /// caller only needs to dispose of its reference when done with
- /// the request.
- ///
- /// Threading: called by worker thread.
- ///
- virtual void stageFromRequest(HttpService *);
- virtual void stageFromReady(HttpService *);
- virtual void stageFromActive(HttpService *);
-
- /// Delivers a notification to a handler object on completion.
- ///
- /// Once a request is complete and it has been removed from its
- /// reply queue, a handler notification may be delivered by a
- /// call to HttpRequest::update(). This method does the necessary
- /// dispatching.
- ///
- /// Threading: called by consumer thread.
- ///
- virtual void visitNotifier(HttpRequest *);
-
- /// Cancels the operation whether queued or active.
- /// Final status of the request becomes canceled (an error) and
- /// that will be delivered to caller via notification scheme.
- ///
- /// Threading: called by worker thread.
- ///
- virtual HttpStatus cancel();
+ /// Register a reply queue and a handler for completion notifications.
+ ///
+ /// Invokers of operations that want to receive notification that an
+ /// operation has been completed do so by binding a reply queue and
+ /// a handler object to the request.
+ ///
+ /// @param reply_queue Pointer to the reply queue where completion
+ /// notifications are to be queued (typically
+ /// by addAsReply()). This will typically be
+ /// the reply queue referenced by the request
+ /// object. This method will increment the
+ /// refcount on the queue holding the queue
+ /// until delivery is complete. Using a reply_queue
+ /// even if the handler is NULL has some benefits
+ /// for memory deallocation by keeping it in the
+ /// originating thread.
+ ///
+ /// @param handler Possibly NULL pointer to a non-refcounted
+ //// handler object to be invoked (onCompleted)
+ /// when the operation is finished. Note that
+ /// the handler object is never dereferenced
+ /// by the worker thread. This is passible data
+ /// until notification is performed.
+ ///
+ /// Threading: called by consumer thread.
+ ///
+ void setReplyPath(HttpReplyQueuePtr_t reply_queue,
+ HttpHandler::ptr_t handler);
+
+ /// The three possible staging steps in an operation's lifecycle.
+ /// Asynchronous requests like HTTP operations move from the
+ /// request queue to the ready queue via stageFromRequest. Then
+ /// from the ready queue to the active queue by stageFromReady. And
+ /// when complete, to the reply queue via stageFromActive and the
+ /// addAsReply utility.
+ ///
+ /// Immediate mode operations (everything else) move from the
+ /// request queue to the reply queue directly via stageFromRequest
+ /// and addAsReply with no existence on the ready or active queues.
+ ///
+ /// These methods will take out a reference count on the request,
+ /// caller only needs to dispose of its reference when done with
+ /// the request.
+ ///
+ /// Threading: called by worker thread.
+ ///
+ virtual void stageFromRequest(HttpService *);
+ virtual void stageFromReady(HttpService *);
+ virtual void stageFromActive(HttpService *);
+
+ /// Delivers a notification to a handler object on completion.
+ ///
+ /// Once a request is complete and it has been removed from its
+ /// reply queue, a handler notification may be delivered by a
+ /// call to HttpRequest::update(). This method does the necessary
+ /// dispatching.
+ ///
+ /// Threading: called by consumer thread.
+ ///
+ virtual void visitNotifier(HttpRequest *);
+
+ /// Cancels the operation whether queued or active.
+ /// Final status of the request becomes canceled (an error) and
+ /// that will be delivered to caller via notification scheme.
+ ///
+ /// Threading: called by worker thread.
+ ///
+ virtual HttpStatus cancel();
/// Retrieves a unique handle for this operation.
HttpHandle getHandle();
@@ -164,30 +164,30 @@ public:
return std::shared_ptr< OPT >();
return std::dynamic_pointer_cast< OPT >(ptr);
}
-
+
protected:
- /// Delivers request to reply queue on completion. After this
- /// call, worker thread no longer accesses the object and it
- /// is owned by the reply queue.
- ///
- /// Threading: called by worker thread.
- ///
- void addAsReply();
-
+ /// Delivers request to reply queue on completion. After this
+ /// call, worker thread no longer accesses the object and it
+ /// is owned by the reply queue.
+ ///
+ /// Threading: called by worker thread.
+ ///
+ void addAsReply();
+
protected:
HttpReplyQueuePtr_t mReplyQueue;
- HttpHandler::ptr_t mUserHandler;
+ HttpHandler::ptr_t mUserHandler;
public:
- // Request Data
- HttpRequest::policy_t mReqPolicy;
+ // Request Data
+ HttpRequest::policy_t mReqPolicy;
- // Reply Data
- HttpStatus mStatus;
+ // Reply Data
+ HttpStatus mStatus;
- // Tracing, debug and metrics
- HttpTime mMetricCreated;
- int mTracing;
+ // Tracing, debug and metrics
+ HttpTime mMetricCreated;
+ int mTracing;
private:
typedef std::map<HttpHandle, wptr_t> handleMap_t;
@@ -197,7 +197,7 @@ private:
HttpHandle mMyHandle;
static handleMap_t mHandleMap;
- static LLCoreInt::HttpMutex mOpMutex;
+ static LLCoreInt::HttpMutex mOpMutex;
protected:
static ptr_t findByHandle(HttpHandle handle);
@@ -219,16 +219,16 @@ protected:
class HttpOpStop : public HttpOperation
{
public:
- HttpOpStop();
+ HttpOpStop();
- virtual ~HttpOpStop();
+ virtual ~HttpOpStop();
private:
- HttpOpStop(const HttpOpStop &); // Not defined
- void operator=(const HttpOpStop &); // Not defined
+ HttpOpStop(const HttpOpStop &); // Not defined
+ void operator=(const HttpOpStop &); // Not defined
public:
- virtual void stageFromRequest(HttpService *);
+ virtual void stageFromRequest(HttpService *);
}; // end class HttpOpStop
@@ -241,16 +241,16 @@ public:
class HttpOpNull : public HttpOperation
{
public:
- HttpOpNull();
+ HttpOpNull();
- virtual ~HttpOpNull();
+ virtual ~HttpOpNull();
private:
- HttpOpNull(const HttpOpNull &); // Not defined
- void operator=(const HttpOpNull &); // Not defined
+ HttpOpNull(const HttpOpNull &); // Not defined
+ void operator=(const HttpOpNull &); // Not defined
public:
- virtual void stageFromRequest(HttpService *);
+ virtual void stageFromRequest(HttpService *);
}; // end class HttpOpNull
@@ -261,25 +261,25 @@ public:
class HttpOpSpin : public HttpOperation
{
public:
- // 0 does a hard spin in the operation
- // 1 does a soft spin continuously requeuing itself
- HttpOpSpin(int mode);
+ // 0 does a hard spin in the operation
+ // 1 does a soft spin continuously requeuing itself
+ HttpOpSpin(int mode);
- virtual ~HttpOpSpin();
+ virtual ~HttpOpSpin();
private:
- HttpOpSpin(const HttpOpSpin &); // Not defined
- void operator=(const HttpOpSpin &); // Not defined
+ HttpOpSpin(const HttpOpSpin &); // Not defined
+ void operator=(const HttpOpSpin &); // Not defined
public:
- virtual void stageFromRequest(HttpService *);
+ virtual void stageFromRequest(HttpService *);
protected:
- int mMode;
+ int mMode;
}; // end class HttpOpSpin
} // end namespace LLCore
-#endif // _LLCORE_HTTP_OPERATION_H_
+#endif // _LLCORE_HTTP_OPERATION_H_