activemq::network::SocketOutputStream Class Reference

#include <SocketOutputStream.h>

Inheritance diagram for activemq::network::SocketOutputStream:

activemq::io::OutputStream activemq::concurrent::Synchronizable List of all members.

Public Member Functions

 SocketOutputStream (Socket::SocketHandle socket)
virtual ~SocketOutputStream ()
virtual void setDebug (const bool debug)
virtual void lock () throw ( exceptions::ActiveMQException )
virtual void unlock () throw ( exceptions::ActiveMQException )
virtual void wait () throw ( exceptions::ActiveMQException )
virtual void wait (unsigned long millisecs) throw ( exceptions::ActiveMQException )
virtual void notify () throw ( exceptions::ActiveMQException )
virtual void notifyAll () throw ( exceptions::ActiveMQException )
virtual void write (const unsigned char c) throw ( io::IOException )
virtual void write (const unsigned char *buffer, const int len) throw ( io::IOException )
virtual void flush () throw ( io::IOException )
virtual void close () throw ( cms::CMSException )

Private Attributes

Socket::SocketHandle socket
concurrent::Mutex mutex
bool debug

Detailed Description

Output stream for performing write operations on a socket.


Constructor & Destructor Documentation

SocketOutputStream::SocketOutputStream Socket::SocketHandle  socket  ) 
 

Constructor.

Parameters:
socket the socket handle.

SocketOutputStream::~SocketOutputStream  )  [virtual]
 


Member Function Documentation

virtual void activemq::network::SocketOutputStream::close void   )  throw ( cms::CMSException ) [inline, virtual]
 

Close - does nothing. It is the responsibility of the owner of the socket object to close it.

Exceptions:
CMSException 

virtual void activemq::network::SocketOutputStream::flush void   )  throw ( io::IOException ) [inline, virtual]
 

Flush - does nothing.

Exceptions:
IOException 

Implements activemq::io::OutputStream.

virtual void activemq::network::SocketOutputStream::lock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Locks the object.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::network::SocketOutputStream::notify  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals a waiter on this object that it can now wake up and continue. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::network::SocketOutputStream::notifyAll  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Signals the waiters on this object that it can now wake up and continue. Must have this object locked before calling.

Implements activemq::concurrent::Synchronizable.

virtual void activemq::network::SocketOutputStream::setDebug const bool  debug  )  [inline, virtual]
 

Enables Debugging of Socket Data

Parameters:
debug true to enable

virtual void activemq::network::SocketOutputStream::unlock  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Unlocks the object.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::network::SocketOutputStream::wait unsigned long  millisecs  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling. This wait will timeout after the specified time interval.

Parameters:
millisecs time in millisecsonds to wait, or WAIT_INIFINITE
Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

virtual void activemq::network::SocketOutputStream::wait  )  throw ( exceptions::ActiveMQException ) [inline, virtual]
 

Waits on a signal from this object, which is generated by a call to Notify. Must have this object locked before calling.

Exceptions:
ActiveMQException 

Implements activemq::concurrent::Synchronizable.

void SocketOutputStream::write const unsigned char *  buffer,
const int  len
throw ( io::IOException ) [virtual]
 

Writes an array of bytes to the output stream.

Parameters:
buffer The array of bytes to write.
len The number of bytes from the buffer to be written.
Exceptions:
IOException thrown if an error occurs.

Implements activemq::io::OutputStream.

void SocketOutputStream::write const unsigned char  c  )  throw ( io::IOException ) [virtual]
 

Writes a single byte to the output stream.

Parameters:
c the byte.
Exceptions:
IOException thrown if an error occurs.

Implements activemq::io::OutputStream.


Member Data Documentation

bool activemq::network::SocketOutputStream::debug [private]
 

concurrent::Mutex activemq::network::SocketOutputStream::mutex [private]
 

Socket::SocketHandle activemq::network::SocketOutputStream::socket [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:33 2006 for activemq-cpp by  doxygen 1.4.5