XRootD
Loading...
Searching...
No Matches
XrdCl::Message Class Reference

The message representation used throughout the system. More...

#include <XrdClMessage.hh>

+ Inheritance diagram for XrdCl::Message:
+ Collaboration diagram for XrdCl::Message:

Public Member Functions

 Message (Message &&msg)
 Move Constructor.
 
 Message (uint32_t size=0)
 Constructor.
 
virtual ~Message ()
 Destructor.
 
const std::string & GetDescription () const
 Get the description of the message.
 
const std::string & GetObfuscatedDescription () const
 Get the description of the message with authz parameter obfuscated.
 
uint64_t GetSessionId () const
 Get the session ID the message is meant for.
 
uint16_t GetVirtReqID () const
 Get virtual request ID for the message.
 
bool IsMarshalled () const
 Check if the message is marshalled.
 
Messageoperator= (Message &&msg)
 Move assignment operator.
 
void SetDescription (const std::string &description)
 Set the description of the message.
 
void SetIsMarshalled (bool isMarshalled)
 Set the marshalling status.
 
void SetSessionId (uint64_t sessionId)
 Set the session ID which this message is meant for.
 
void SetVirtReqID (uint16_t virtReqID)
 Set virtual request ID for the message.
 
- Public Member Functions inherited from XrdCl::Buffer
 Buffer (Buffer &&buffer)
 Move Constructor.
 
 Buffer (uint32_t size=0)
 Constructor.
 
virtual ~Buffer ()
 Destructor.
 
void AdvanceCursor (uint32_t delta)
 Advance the cursor.
 
void Allocate (uint32_t size)
 Allocate the buffer.
 
void Append (const char *buffer, uint32_t size)
 Append data at the position pointed to by the append cursor.
 
void Append (const char *buffer, uint32_t size, uint32_t offset)
 Append data at the given offset.
 
void Free ()
 Free the buffer.
 
void FromString (const std::string str)
 Fill the buffer from a string.
 
char * GetBuffer (uint32_t offset=0)
 Get the message buffer.
 
const char * GetBuffer (uint32_t offset=0) const
 Get the message buffer.
 
char * GetBufferAtCursor ()
 Get the buffer pointer at the append cursor.
 
const char * GetBufferAtCursor () const
 Get the buffer pointer at the append cursor.
 
uint32_t GetCursor () const
 Get append cursor.
 
uint32_t GetSize () const
 Get the size of the message.
 
void Grab (char *buffer, uint32_t size)
 Grab a buffer allocated outside.
 
Bufferoperator= (Buffer &&buffer)
 Move assignment operator.
 
void ReAllocate (uint32_t size)
 Reallocate the buffer to a new location of a given size.
 
char * Release ()
 Release the buffer.
 
void SetCursor (uint32_t cursor)
 Set the cursor.
 
std::string ToString () const
 Convert the buffer to a string.
 
void Zero ()
 Zero.
 

Additional Inherited Members

- Protected Member Functions inherited from XrdCl::Buffer
void Steal (Buffer &&buffer)
 

Detailed Description

The message representation used throughout the system.

Definition at line 31 of file XrdClMessage.hh.

Constructor & Destructor Documentation

◆ Message() [1/2]

XrdCl::Message::Message ( uint32_t  size = 0)
inline

Constructor.

Definition at line 37 of file XrdClMessage.hh.

37 :
38 Buffer( size ), pIsMarshalled( false ), pSessionId(0), pVirtReqID( 0 )
39 {
40 if( size )
41 Zero();
42 }
Buffer(uint32_t size=0)
Constructor.
void Zero()
Zero.

References XrdCl::Buffer::Zero().

+ Here is the call graph for this function:

◆ Message() [2/2]

XrdCl::Message::Message ( Message &&  msg)
inline

Move Constructor.

Definition at line 47 of file XrdClMessage.hh.

47 :
48 Buffer( std::move( msg ) ), pIsMarshalled( msg.pIsMarshalled ),
49 pSessionId( std::move( msg.pSessionId ) ), pVirtReqID( msg.pVirtReqID )
50 {
51 }

◆ ~Message()

virtual XrdCl::Message::~Message ( )
inlinevirtual

Destructor.

Definition at line 68 of file XrdClMessage.hh.

68{}

Member Function Documentation

◆ GetDescription()

const std::string & XrdCl::Message::GetDescription ( ) const
inline

Get the description of the message.

Definition at line 98 of file XrdClMessage.hh.

99 {
100 return pDescription;
101 }

◆ GetObfuscatedDescription()

const std::string & XrdCl::Message::GetObfuscatedDescription ( ) const
inline

◆ GetSessionId()

uint64_t XrdCl::Message::GetSessionId ( ) const
inline

Get the session ID the message is meant for.

Definition at line 122 of file XrdClMessage.hh.

123 {
124 return pSessionId;
125 }

Referenced by XrdCl::XRootDMsgHandler::XRootDMsgHandler(), and XrdCl::Stream::Send().

+ Here is the caller graph for this function:

◆ GetVirtReqID()

uint16_t XrdCl::Message::GetVirtReqID ( ) const
inline

Get virtual request ID for the message.

Definition at line 138 of file XrdClMessage.hh.

139 {
140 return pVirtReqID;
141 }

Referenced by XrdCl::LocalFileHandler::ExecRequest(), and XrdCl::AsyncRawReader::GetResponse().

+ Here is the caller graph for this function:

◆ IsMarshalled()

bool XrdCl::Message::IsMarshalled ( ) const
inline

Check if the message is marshalled.

Definition at line 73 of file XrdClMessage.hh.

74 {
75 return pIsMarshalled;
76 }

Referenced by XrdCl::XRootDTransport::UnMarshallRequest().

+ Here is the caller graph for this function:

◆ operator=()

Message & XrdCl::Message::operator= ( Message &&  msg)
inline

Move assignment operator.

Definition at line 56 of file XrdClMessage.hh.

57 {
58 Steal( std::move( msg ) );
59 pIsMarshalled = msg.pIsMarshalled;
60 pSessionId = std::move( msg.pSessionId );
61 pVirtReqID = msg.pVirtReqID;
62 return *this;
63 }
void Steal(Buffer &&buffer)

References XrdCl::Buffer::Steal().

+ Here is the call graph for this function:

◆ SetDescription()

void XrdCl::Message::SetDescription ( const std::string &  description)
inline

Set the description of the message.

Definition at line 89 of file XrdClMessage.hh.

90 {
91 pDescription = description;
92 pObfuscatedDescription = obfuscateAuth(description);
93 }
std::string obfuscateAuth(const std::string &input)

References obfuscateAuth().

Referenced by XrdCl::XRootDTransport::SetDescription().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIsMarshalled()

void XrdCl::Message::SetIsMarshalled ( bool  isMarshalled)
inline

Set the marshalling status.

Definition at line 81 of file XrdClMessage.hh.

82 {
83 pIsMarshalled = isMarshalled;
84 }

Referenced by XrdCl::XRootDTransport::MarshallRequest(), and XrdCl::XRootDTransport::UnMarshallRequest().

+ Here is the caller graph for this function:

◆ SetSessionId()

void XrdCl::Message::SetSessionId ( uint64_t  sessionId)
inline

Set the session ID which this message is meant for.

Definition at line 114 of file XrdClMessage.hh.

115 {
116 pSessionId = sessionId;
117 }

Referenced by XrdCl::FileStateHandler::Close().

+ Here is the caller graph for this function:

◆ SetVirtReqID()

void XrdCl::Message::SetVirtReqID ( uint16_t  virtReqID)
inline

Set virtual request ID for the message.

Definition at line 130 of file XrdClMessage.hh.

131 {
132 pVirtReqID = virtReqID;
133 }

Referenced by XrdCl::FileStateHandler::ReadV().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: