| 
    rippled
    
   | 
 
An endpoint that consumes resources. More...
#include <Consumer.h>

Public Member Functions | |
| Consumer () | |
| ~Consumer () | |
| Consumer (Consumer const &other) | |
| Consumer & | operator= (Consumer const &other) | 
| std::string | to_string () const | 
| Return a human readable string uniquely identifying this consumer.   | |
| bool | isUnlimited () const | 
Returns true if this is a privileged endpoint.   | |
| void | elevate (std::string const &name) | 
| Raise the Consumer's privilege level to a Named endpoint.   | |
| Disposition | disposition () const | 
| Returns the current disposition of this consumer.   | |
| Disposition | charge (Charge const &fee, std::string const &context={}) | 
| Apply a load charge to the consumer.   | |
| bool | warn () | 
Returns true if the consumer should be warned.   | |
| bool | disconnect (beast::Journal const &j) | 
Returns true if the consumer should be disconnected.   | |
| int | balance () | 
| Returns the credit balance representing consumption.   | |
| Entry & | entry () | 
| void | setPublicKey (PublicKey const &publicKey) | 
Private Member Functions | |
| Consumer (Logic &logic, Entry &entry) | |
Private Attributes | |
| Logic * | m_logic | 
| Entry * | m_entry | 
Friends | |
| class | Logic | 
An endpoint that consumes resources.
Definition at line 35 of file Consumer.h.
Definition at line 35 of file Consumer.cpp.
| ripple::Resource::Consumer::Consumer | ( | ) | 
Definition at line 40 of file Consumer.cpp.
| ripple::Resource::Consumer::~Consumer | ( | ) | 
Definition at line 54 of file Consumer.cpp.
| ripple::Resource::Consumer::Consumer | ( | Consumer const & | other | ) | 
Definition at line 44 of file Consumer.cpp.
Definition at line 61 of file Consumer.cpp.
| std::string ripple::Resource::Consumer::to_string | ( | ) | const | 
Return a human readable string uniquely identifying this consumer.
Definition at line 78 of file Consumer.cpp.
| bool ripple::Resource::Consumer::isUnlimited | ( | ) | const | 
Returns true if this is a privileged endpoint. 
Definition at line 87 of file Consumer.cpp.
| void ripple::Resource::Consumer::elevate | ( | std::string const & | name | ) | 
Raise the Consumer's privilege level to a Named endpoint.
The reference to the original endpoint descriptor is released.
| Disposition ripple::Resource::Consumer::disposition | ( | ) | const | 
Returns the current disposition of this consumer.
This should be checked upon creation to determine if the consumer should be disconnected immediately.
Definition at line 96 of file Consumer.cpp.
| Disposition ripple::Resource::Consumer::charge | ( | Charge const & | fee, | 
| std::string const & | context = {}  | 
        ||
| ) | 
Apply a load charge to the consumer.
Definition at line 106 of file Consumer.cpp.
| bool ripple::Resource::Consumer::warn | ( | ) | 
Returns true if the consumer should be warned. 
This consumes the warning.
Definition at line 117 of file Consumer.cpp.
| bool ripple::Resource::Consumer::disconnect | ( | beast::Journal const & | j | ) | 
Returns true if the consumer should be disconnected. 
Definition at line 124 of file Consumer.cpp.
| int ripple::Resource::Consumer::balance | ( | ) | 
Returns the credit balance representing consumption.
Definition at line 137 of file Consumer.cpp.
| Entry & ripple::Resource::Consumer::entry | ( | ) | 
Definition at line 145 of file Consumer.cpp.
| void ripple::Resource::Consumer::setPublicKey | ( | PublicKey const & | publicKey | ) | 
Definition at line 152 of file Consumer.cpp.
      
  | 
  friend | 
Definition at line 38 of file Consumer.h.
      
  | 
  private | 
Definition at line 95 of file Consumer.h.
      
  | 
  private | 
Definition at line 96 of file Consumer.h.