AceSmartSoft API Documentation
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SmartACE::NSProxy Class Reference

#include <smartNSProxy.hh>

Inheritance diagram for SmartACE::NSProxy:
SmartACE::ServiceHandler

Public Member Functions

 NSProxy ()
 
virtual ~NSProxy ()
 
virtual int open (void *handler=0)
 Initialization to create and activate an instance of this ACE_Svc_Handler class. More...
 
virtual int bind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in="")
 Bind a new name to a naming context (Wide character strings). More...
 
virtual int rebind (const ACE_NS_WString &name_in, const ACE_NS_WString &value_in, const char *type_in="")
 Overwrite the value or type of an existing name in a ACE_Name_Space or bind a new name to the context, if it didn't exist yet. More...
 
virtual int unbind (const ACE_NS_WString &name_in)
 Delete a name from a ACE_Name_Space (Wide charcter strings Interface). More...
 
virtual int resolve (const ACE_NS_WString &name_in, ACE_NS_WString &value_out, char *&type_out)
 Get value and type of a given name binding (Wide chars). More...
 
virtual int list_names (ACE_WSTRING_SET &set_out, const ACE_NS_WString &pattern_in)
 Get a set of names matching a specified pattern (wchars). More...
 
virtual int list_values (ACE_WSTRING_SET &set_out, const ACE_NS_WString &pattern_in)
 Get a set of values matching a specified pattern (wchars). More...
 
virtual int list_types (ACE_WSTRING_SET &set_out, const ACE_NS_WString &pattern_in)
 Get a set of types matching a specified pattern (wchars). More...
 
virtual int list_name_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 Get a set of names matching a specified pattern (wchars). More...
 
virtual int list_value_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 Get a set of values matching a specified pattern (wchars). More...
 
virtual int list_type_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern)
 Get a set of types matching a specified pattern (wchars). More...
 
virtual void dump (void) const
 
- Public Member Functions inherited from SmartACE::ServiceHandler
 ServiceHandler (ACE_Reactor *reactor=ACE_Reactor::instance())
 Default constructor and destructor. More...
 
virtual ~ServiceHandler ()
 
virtual int handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 This is the main input-handler function that is called by the reactor to handle incoming data streams. More...
 
virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 Hook handler method to handle closing connection. More...
 
virtual int send_command_message (ACE_CDR::Long commandId, const ACE_Message_Block *further_comands=NULL, const ACE_Message_Block *message=NULL)
 This method encapsulates the message sending behavior. More...
 
void trigger_shutdown ()
 Trigger the shutdown procedure to be executed by the reactor. More...
 
bool is_disconnected () const
 This method returns true if reactor has closed the connection (due to e.g. More...
 

Protected Types

enum  REPLY_ID { REPLY_CONTINUE =1, REPLY_OK =0, REPLY_ERROR =-1, REPLY_ALREADY_BOUND =-2 }
 
- Protected Types inherited from SmartACE::ServiceHandler
typedef ACE_Svc_Handler< ACE_SOCK_STREAM, ACE_NULL_SYNCH > super
 Definition for parent class. More...
 

Protected Member Functions

virtual int handle_incomming_message (ACE_CDR::Long command, ACE_InputCDR &cmd_is, ACE_InputCDR &msg_is)
 This handler should be implemented in derived classes. More...
 
int list_entries (ACE_BINDING_SET &set_out, const ACE_NS_WString &pattern_in, const ACE_Name_Request::Constants &command_in)
 
int lists (ACE_WSTRING_SET &set_out, const ACE_NS_WString &pattern_in, const ACE_Name_Request::Constants &command_in)
 
- Protected Member Functions inherited from SmartACE::ServiceHandler
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 This callback handler is indirectly triggered (using the reactor's notify mechanism) from the method trigger_shutdown() which can be used by external threads. More...
 
virtual void destroy (void)
 This class is overloaded from base class to change visibility (in order to prevent the destruction from external threads). More...
 

Protected Attributes

ACE_CString incoming_name
 
ACE_CString incoming_value
 
ACE_CString incoming_type
 
- Protected Attributes inherited from SmartACE::ServiceHandler
bool connectionClosedByUser
 This internal variable is used to distinguish whether a connection is closed actively by an external thread (using the method trigger_shutdown() ) or the connection is closed because the underlying socket is broken. More...
 
bool connectionResetByReactor
 This internal variable indicates that a connection was closed by reactor e.g. More...
 

Member Enumeration Documentation

◆ REPLY_ID

Enumerator
REPLY_CONTINUE 
REPLY_OK 
REPLY_ERROR 
REPLY_ALREADY_BOUND 

Constructor & Destructor Documentation

◆ NSProxy()

SmartACE::NSProxy::NSProxy ( )

◆ ~NSProxy()

virtual SmartACE::NSProxy::~NSProxy ( )
virtual

Member Function Documentation

◆ bind()

virtual int SmartACE::NSProxy::bind ( const ACE_NS_WString &  name_in,
const ACE_NS_WString &  value_in,
const char *  type_in = "" 
)
virtual

Bind a new name to a naming context (Wide character strings).

◆ dump()

virtual void SmartACE::NSProxy::dump ( void  ) const
virtual

◆ handle_incomming_message()

virtual int SmartACE::NSProxy::handle_incomming_message ( ACE_CDR::Long  command,
ACE_InputCDR &  cmd_is,
ACE_InputCDR &  msg_is 
)
protectedvirtual

This handler should be implemented in derived classes.

It should implement the dispatching of the incoming requests to the corresponding call-back methods (from the communication pattern).

Implements SmartACE::ServiceHandler.

◆ list_entries()

int SmartACE::NSProxy::list_entries ( ACE_BINDING_SET &  set_out,
const ACE_NS_WString &  pattern_in,
const ACE_Name_Request::Constants &  command_in 
)
protected

◆ list_name_entries()

virtual int SmartACE::NSProxy::list_name_entries ( ACE_BINDING_SET &  set,
const ACE_NS_WString &  pattern 
)
virtual

Get a set of names matching a specified pattern (wchars).

Matching means the names must begin with the pattern string. Returns the complete binding associated each pattern match.

◆ list_names()

virtual int SmartACE::NSProxy::list_names ( ACE_WSTRING_SET &  set_out,
const ACE_NS_WString &  pattern_in 
)
virtual

Get a set of names matching a specified pattern (wchars).

Matching means the names must begin with the pattern string.

◆ list_type_entries()

virtual int SmartACE::NSProxy::list_type_entries ( ACE_BINDING_SET &  set,
const ACE_NS_WString &  pattern 
)
virtual

Get a set of types matching a specified pattern (wchars).

Matching means the types must begin with the pattern string. Returns the complete binding associated each pattern match.

◆ list_types()

virtual int SmartACE::NSProxy::list_types ( ACE_WSTRING_SET &  set_out,
const ACE_NS_WString &  pattern_in 
)
virtual

Get a set of types matching a specified pattern (wchars).

Matching means the types must begin with the pattern string.

◆ list_value_entries()

virtual int SmartACE::NSProxy::list_value_entries ( ACE_BINDING_SET &  set,
const ACE_NS_WString &  pattern 
)
virtual

Get a set of values matching a specified pattern (wchars).

Matching means the values must begin with the pattern string. Returns the complete binding associated each pattern match.

◆ list_values()

virtual int SmartACE::NSProxy::list_values ( ACE_WSTRING_SET &  set_out,
const ACE_NS_WString &  pattern_in 
)
virtual

Get a set of values matching a specified pattern (wchars).

Matching means the values must begin with the pattern string.

◆ lists()

int SmartACE::NSProxy::lists ( ACE_WSTRING_SET &  set_out,
const ACE_NS_WString &  pattern_in,
const ACE_Name_Request::Constants &  command_in 
)
protected

◆ open()

virtual int SmartACE::NSProxy::open ( void *  handler = 0)
virtual

Initialization to create and activate an instance of this ACE_Svc_Handler class.

Here, memory allocation and ACE_Svc_Handler parameterization takes place. The default implementation just calls the same method from parent class.

Parameters
handlerA pointer to the parent controlling class (in this case ACE_Connector or ACE_Acceptor)
Returns
error-code
  • A "-1" determines an error
  • A "0" is returned if all goes right

Reimplemented from SmartACE::ServiceHandler.

◆ rebind()

virtual int SmartACE::NSProxy::rebind ( const ACE_NS_WString &  name_in,
const ACE_NS_WString &  value_in,
const char *  type_in = "" 
)
virtual

Overwrite the value or type of an existing name in a ACE_Name_Space or bind a new name to the context, if it didn't exist yet.

(Wide charcter strings interface).

◆ resolve()

virtual int SmartACE::NSProxy::resolve ( const ACE_NS_WString &  name_in,
ACE_NS_WString &  value_out,
char *&  type_out 
)
virtual

Get value and type of a given name binding (Wide chars).

The caller is responsible for deleting both value_out and type_out!

◆ unbind()

virtual int SmartACE::NSProxy::unbind ( const ACE_NS_WString &  name_in)
virtual

Delete a name from a ACE_Name_Space (Wide charcter strings Interface).

Member Data Documentation

◆ incoming_name

ACE_CString SmartACE::NSProxy::incoming_name
protected

◆ incoming_type

ACE_CString SmartACE::NSProxy::incoming_type
protected

◆ incoming_value

ACE_CString SmartACE::NSProxy::incoming_value
protected

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