summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorarvindk <arvindk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-09-06 16:51:02 +0000
committerarvindk <arvindk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-09-06 16:51:02 +0000
commit70a29b69675063a6b6f025ed347029db63103fd0 (patch)
tree63b7c685857e454b3f1fcbf08d5b27d54c78cf51 /TAO
parent19f30504690473566625e099c4f18e9b82cc471f (diff)
downloadATCD-70a29b69675063a6b6f025ed347029db63103fd0.tar.gz
ChangelogTag: Tue Sep 6 11:32:31 2005 Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/IIOP_Endpoint.h4
-rw-r--r--TAO/tao/IIOP_Transport.cpp14
-rw-r--r--TAO/tao/Profile.cpp13
-rw-r--r--TAO/tao/Profile.h10
-rw-r--r--TAO/tao/Transport.cpp87
-rw-r--r--TAO/tao/Transport.h33
-rw-r--r--TAO/tao/Transport_Acceptor.cpp4
-rw-r--r--TAO/tao/Transport_Acceptor.h16
8 files changed, 155 insertions, 26 deletions
diff --git a/TAO/tao/IIOP_Endpoint.h b/TAO/tao/IIOP_Endpoint.h
index 9e5a357552b..76bd42203c8 100644
--- a/TAO/tao/IIOP_Endpoint.h
+++ b/TAO/tao/IIOP_Endpoint.h
@@ -125,7 +125,7 @@ public:
private:
- //@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START
+ //@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START
/// Helper method for setting INET_Addr.
int set (const ACE_INET_Addr &addr,
@@ -180,7 +180,7 @@ private:
/// endpoint in the list, if any.
TAO_IIOP_Endpoint *next_;
- //@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START
+ //@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_COPY_HOOK_START
};
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index ddadefc4b3b..8818d9d76da 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -33,6 +33,16 @@ TAO_IIOP_Transport::~TAO_IIOP_Transport (void)
delete this->messaging_object_;
}
+/*
+ * Hook to copy over all concrete implementations
+ * of Transport class from this class to the base
+ * class as a part of the specialization.
+ * All enhancements to the IIOP_Transport
+ * class, i.e., addition of new concrete non virtual
+ * methods should be added within this hook.
+ */
+
+//@@ TAO_TRANSPORT_SPL_COPY_HOOK_START
ACE_Event_Handler *
TAO_IIOP_Transport::event_handler_i (void)
{
@@ -407,3 +417,7 @@ TAO_IIOP_Transport::get_listen_point (
return 1;
}
+//@@ TAO_TRANSPORT_SPL_COPY_HOOK_END
+/*
+ * End of copy hook.
+ */
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index 7b3597d3a55..c6730ac24cb 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -77,6 +77,8 @@ TAO_Profile::~TAO_Profile (void)
this->orb_core_->object_key_table ().unbind (this->ref_object_key_);
delete this->refcount_lock_;
+
+ //@@ TAO_PROFILE_SPL_DESTRUCTOR_ADD_HOOK
}
CORBA::ULong
@@ -736,6 +738,13 @@ TAO_Profile::hash_service_i (CORBA::ULong m)
return this->orb_core_->hash_service (this, m);
}
+/*
+ * Hook to comment out no op method
+ * in the base class that is specialized in the
+ * derived class.
+ */
+//@@ TAO_PROFILE_SPL_COMMENT_HOOK_START
+
int
TAO_Profile::encode_alternate_endpoints(void)
{
@@ -748,6 +757,10 @@ TAO_Profile::encode_alternate_endpoints(void)
return 0;
}
+//@@ TAO_PROFILE_SPL_COMMENT_HOOK_END
+
+//@@ TAO_PROFILE_SPL_METHODS_ADD_HOOK
+
// ****************************************************************
TAO_Unknown_Profile::TAO_Unknown_Profile (CORBA::ULong tag,
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index 0063a280a6b..bacc317e010 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -227,6 +227,8 @@ public:
ACE_ENV_ARG_DECL) = 0;
//@}
+ //@@ TAO_PROFILE_SPL_PUBLIC_METHODS_ADD_HOOK
+
protected:
/// If you have a virtual method you need a virtual dtor.
virtual ~TAO_Profile (void);
@@ -300,6 +302,8 @@ private:
ACE_UNIMPLEMENTED_FUNC (TAO_Profile (const TAO_Profile&))
ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Profile&))
+ //@@ TAO_PROFILE_SPL_PROTECTED_METHODS_ADD_HOOK
+
protected:
/// IIOP version number.
@@ -339,8 +343,12 @@ private:
/// Number of outstanding references to this object.
CORBA::ULong refcount_;
+
+ //@@ TAO_ENDPOINT_SPL_PRIVATE_DATA_ADD_HOOK
};
+//@@ TAO_ENDPOINT_SPL_EXTERN_ADD_HOOK
+
// A helper class to handle the various kinds of octet sequences used
// inside the ORB.
@@ -405,6 +413,8 @@ private:
TAO_opaque body_;
};
+//@@ TAO_PROFILE_SPL_EXTERN_HOOK
+
#if defined (__ACE_INLINE__)
# include "Profile.i"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index db7cbb0074f..3d43e26154b 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -27,6 +27,11 @@
#include "ace/Reactor.h"
#include "ace/os_include/sys/os_uio.h"
+/*
+ * Specialization hook to add include files from
+ * concrete transport implementation.
+ */
+//@@ TAO_TRANSPORT_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
#if !defined (__ACE_INLINE__)
# include "Transport.inl"
@@ -140,6 +145,14 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag,
// Create TMS now.
this->tms_ = cf->create_transport_mux_strategy (this);
+
+ /*
+ * Hook to add code that initializes components that
+ * belong to the concrete protocol implementation.
+ * Further additions to this Transport class will
+ * need to add code *before* this hook.
+ */
+ //@@ TAO_TRANSPORT_SPL_CONSTRUCTOR_ADD_HOOK
}
TAO_Transport::~TAO_Transport (void)
@@ -168,6 +181,14 @@ TAO_Transport::~TAO_Transport (void)
// *must* have been cleaned up.
ACE_ASSERT (this->head_ == 0);
ACE_ASSERT (this->cache_map_entry_ == 0);
+
+ /*
+ * Hook to add code that cleans up components
+ * belong to the concrete protocol implementation.
+ * Further additions to this Transport class will
+ * need to add code *before* this hook.
+ */
+ //@@ TAO_TRANSPORT_SPL_DESTRUCTOR_ADD_HOOK
}
void
@@ -204,12 +225,48 @@ TAO_Transport::idle_after_reply (void)
return this->tms ()->idle_after_reply ();
}
+/*
+ * A concrete transport class specializes this
+ * method. This hook allows commenting this function
+ * when TAO's transport is specialized. Note: All
+ * functions that have an implementation that does
+ * nothing should be added within this hook to
+ * enable specialization.
+ */
+//@@ TAO_TRANSPORT_SPL_COMMENT_HOOK_START
+
int
TAO_Transport::tear_listen_point_list (TAO_InputCDR &)
{
ACE_NOTSUP_RETURN (-1);
}
+int
+TAO_Transport::send_message_shared (TAO_Stub *stub,
+ int message_semantics,
+ const ACE_Message_Block *message_block,
+ ACE_Time_Value *max_wait_time)
+{
+ int result;
+
+ {
+ ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
+
+ result =
+ this->send_message_shared_i (stub, message_semantics,
+ message_block, max_wait_time);
+ }
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ }
+
+ return result;
+}
+
+//@@ TAO_TRANSPORT_SPL_COMMENT_HOOK_END
+
bool
TAO_Transport::post_connect_hook (void)
{
@@ -449,30 +506,6 @@ TAO_Transport::send_message_block_chain_i (const ACE_Message_Block *mb,
}
int
-TAO_Transport::send_message_shared (TAO_Stub *stub,
- int message_semantics,
- const ACE_Message_Block *message_block,
- ACE_Time_Value *max_wait_time)
-{
- int result;
-
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
-
- result =
- this->send_message_shared_i (stub, message_semantics,
- message_block, max_wait_time);
- }
-
- if (result == -1)
- {
- this->close_connection ();
- }
-
- return result;
-}
-
-int
TAO_Transport::send_synchronous_message_i (const ACE_Message_Block *mb,
ACE_Time_Value *max_wait_time)
{
@@ -2461,3 +2494,9 @@ TAO_Transport::allocate_partial_message_block (void)
}
}
+/*
+ * Hook to add concrete implementations from the derived class onto
+ * TAO's transport.
+ */
+
+//@@ TAO_TRANSPORT_SPL_METHODS_ADD_HOOK
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index e70f72e0a0b..d88d32dff2f 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -57,6 +57,11 @@ namespace TAO
};
}
+/*
+ * Specialization hook for the TAO's transport implementation.
+ */
+//@@ TAO_TRANSPORT_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
+
/**
* @class TAO_Transport
*
@@ -509,6 +514,13 @@ public:
/// Accessor for the output CDR stream
TAO_OutputCDR &out_stream (void);
+ /*
+ * Specialization hook to add public methods from
+ * concrete transport implementations to TAO's transport
+ * class
+ */
+ //@@ TAO_TRANSPORT_SPL_PUBLIC_METHODS_ADD_HOOK
+
protected:
virtual TAO_Connection_Handler * connection_handler_i (void) = 0;
@@ -898,6 +910,13 @@ private:
ACE_UNIMPLEMENTED_FUNC (TAO_Transport (const TAO_Transport&))
ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Transport&))
+ /*
+ * Specialization hook to add concrete private methods from
+ * TAO's protocol implementation onto the base Transport class
+ */
+
+ //@@ TAO_TRANSPORT_PRIVATE_METHODS_ADD_HOOK
+
protected:
/// IOP protocol tag.
@@ -1023,8 +1042,22 @@ private:
/// Holds the partial GIOP message (if there is one)
ACE_Message_Block* partial_message_;
+
+ /*
+ * specialization hook to add class members from concrete
+ * transport class onto the base transport class. Please
+ * add any private members to this class *before* this hook.
+ */
+ //@@ TAO_TRANSPORT_SPL_DATA_MEMBERS_ADD_HOOK
};
+/*
+ * Hook to add external typedefs and specializations to
+ * TAO's transport implementation.
+ */
+
+//@@ TAO_TRANSPORT_EXTERN_ADD_HOOK
+
#if defined (__ACE_INLINE__)
# include "Transport.inl"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/Transport_Acceptor.cpp b/TAO/tao/Transport_Acceptor.cpp
index ebc460afdd0..a4825e9286c 100644
--- a/TAO/tao/Transport_Acceptor.cpp
+++ b/TAO/tao/Transport_Acceptor.cpp
@@ -19,4 +19,8 @@ TAO_Acceptor::TAO_Acceptor (CORBA::ULong tag)
TAO_Acceptor::~TAO_Acceptor (void)
{
+
+ //@@ TAO_ACCEPTOR_DESTRUCTOR_ADD_HOOK
}
+
+//@@ TAO_ACCEPTOR_SPL_METHODS_ADD_HOOK
diff --git a/TAO/tao/Transport_Acceptor.h b/TAO/tao/Transport_Acceptor.h
index f05ef48e4be..fa0adaa9ac1 100644
--- a/TAO/tao/Transport_Acceptor.h
+++ b/TAO/tao/Transport_Acceptor.h
@@ -44,6 +44,8 @@ namespace TAO
class ObjectKey;
}
+//@@ TAO_ACCEPTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
+
// ****************************************************************
/// The TAO-specific OMG assigned value for the TAG_ORB_TYPE tagged
@@ -129,11 +131,25 @@ public:
virtual int object_key (IOP::TaggedProfile &profile,
TAO::ObjectKey &key) = 0;
+ /*
+ * Hook to add public methods from derived acceptor classes onto
+ * this class.
+ */
+ //@@ TAO_ACCEPTOR_PUBLIC_METHODS_ADD_HOOK
+
private:
/// IOP protocol tag.
CORBA::ULong tag_;
+
+ /*
+ * Hook to add data members from concrete acceptor implementations onto
+ * the base class.
+ */
+ //@@ TAO_ACCEPTOR_SPL_DATA_MEMBERS_ADD_HOOK
};
+//@@ TAO_ACCEPTOR_EXTERN_ADD_HOOK
+
#if defined (__ACE_INLINE__)
# include "Transport_Acceptor.inl"
#endif /* __ACE_INLINE__ */