cmlabs::MediaServer Class Reference

#include <MediaServer.h>

Inheritance diagram for cmlabs::MediaServer:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::MediaServer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MediaServer (const JString &servername, long hardMaxSize=-1, long softMaxSize=-1, long maxCount=-1, long maxBackupCount=-1)
virtual ~MediaServer ()
Objectclone () const
bool unitTest ()
bool init (int port)
 Setup network on port. If false try other port...
void run ()
bool handleMultipleWriters (bool allow)
TCPLocation getLocation ()
JString getName ()
MessagenetObjectReceive (Message *msg, NetworkConnection *con)
HTMLPageserveHTTPRequest (const JString &origin, HTTPRequest *request)
MessageserveTelnetInput (const JString &id, const JString &origin, const JString &text)
long getTotalDataSize ()
long getTotalDataMemUse ()
int getCount ()
double getInputDataRate ()
double getOutputDataRate ()
double getTotalDataEverHandled ()
int getConnectionCount ()
ConnectionProfile getConnectionProfile (const JString &client)
InfoItemgetInfo ()
InfoItemgetInfoAllStats ()
JTime getOldestTimestamp ()
JTime getNewestTimestamp ()
ObjectCollectiongetDataSampleList ()
DataSamplegetOldestSample (const JString &clientname)
DataSamplegetNewestSample (const JString &clientname)
DataSamplegetDataSample (const JString &clientname, const JTime &time)
 Get one sample.
DataSamplegetDataSample (const JTime &time)
ObjectCollectiongetDataSamples (const JString &clientname, const JTime &t1, const JTime &t2)
 Get many samples.
ObjectCollectiongetDataSamples (const JTime &t1, const JTime &t2)
bool addDataSample (const JString &clientname, DataSample *sample)
 Add one sample.
bool addDataSample (DataSample *sample)
bool addDataSamples (const JString &clientname, ObjectCollection *samples)
 Add many samples.
bool addDataSamples (ObjectCollection *samples)
DataSamplewaitForFirstSampleAfter (const JString &clientname, const JTime &time, long ms)
DataSamplewaitForFirstSampleAfter (const JTime &time, long ms)
DataSamplewaitForLastSampleAfter (const JString &clientname, const JTime &time, long ms)
DataSamplewaitForLastSampleAfter (const JTime &time, long ms)
DataSamplewaitForSampleAt (const JString &clientname, const JTime &time, long ms)
DataSamplewaitForSampleAt (const JTime &time, long ms)
DataSamplegetSample (const JString &clientname, const JString &id)
DataSamplegetFirstSampleAfter (const JString &clientname, const JString &id)
DataSamplewaitForFirstSampleAfter (const JString &clientname, const JString &id, long ms)
DataSamplewaitForLastSampleAfter (const JString &clientname, const JString &id, long ms)
DataSamplegetSample (const JString &id)
DataSamplegetFirstSampleAfter (const JString &id)
DataSamplewaitForFirstSampleAfter (const JString &id, long ms)
DataSamplewaitForLastSampleAfter (const JString &id, long ms)
bool createChannel (const JString &name, const JString &fieldname)
bool destroyChannel (const JString &name)
ObjectCollectionsearchChannel (const JString &name, double val1, double val2)
bool subscribeChannel (const JString &connection, const JString &channel, double val1, double val2)
bool unsubscribeChannel (const JString &connection, const JString &channel, double val1, double val2)
bool unsubscribeChannel (const JString &connection, SubscriptionEntry *entry)
bool unsubscribeAllChannels (const JString &connection)
bool subscriptionMatch (ObjectCollection *subs, DataSample *sample)

Public Attributes

ObjectDictionary serverProfiles
ObjectDictionary serverNetworkProfiles
ObjectDictionary directSubscribers

Protected Member Functions

bool addDataStat (const JString &name, long upbytes, long downbytes, const JTime &time=JTime())

Protected Attributes

JString name
MediaStreammediaStream
Networknetwork
bool shouldContinue
ObjectCollection continuousCons
JTime lastContinuousSend
ObjectDictionary subscriptions


Detailed Description

Definition at line 57 of file MediaServer.h.


Constructor & Destructor Documentation

cmlabs::MediaServer::MediaServer ( const JString servername,
long  hardMaxSize = -1,
long  softMaxSize = -1,
long  maxCount = -1,
long  maxBackupCount = -1 
)

Definition at line 26 of file MediaServer.cpp.

cmlabs::MediaServer::~MediaServer (  )  [virtual]

Definition at line 49 of file MediaServer.cpp.


Member Function Documentation

Object * cmlabs::MediaServer::clone (  )  const [virtual]

Implements cmlabs::Object.

Definition at line 59 of file MediaServer.cpp.

bool cmlabs::MediaServer::unitTest (  ) 

Reimplemented from cmlabs::JThread.

Definition at line 863 of file MediaServer.cpp.

bool cmlabs::MediaServer::init ( int  port  ) 

Setup network on port. If false try other port...

Definition at line 63 of file MediaServer.cpp.

void cmlabs::MediaServer::run (  )  [virtual]

Reimplemented from cmlabs::JThread.

Definition at line 538 of file MediaServer.cpp.

bool cmlabs::MediaServer::handleMultipleWriters ( bool  allow  ) 

Definition at line 90 of file MediaServer.cpp.

TCPLocation cmlabs::MediaServer::getLocation (  ) 

Definition at line 530 of file MediaServer.cpp.

JString cmlabs::MediaServer::getName (  )  [virtual]

Implements cmlabs::TCPReceiver.

Definition at line 71 of file MediaServer.cpp.

Message * cmlabs::MediaServer::netObjectReceive ( Message msg,
NetworkConnection con 
) [virtual]

Reimplemented from cmlabs::TCPReceiver.

Definition at line 132 of file MediaServer.cpp.

HTMLPage * cmlabs::MediaServer::serveHTTPRequest ( const JString origin,
HTTPRequest request 
)

Definition at line 825 of file MediaServer.cpp.

Message * cmlabs::MediaServer::serveTelnetInput ( const JString id,
const JString origin,
const JString text 
)

Definition at line 836 of file MediaServer.cpp.

long cmlabs::MediaServer::getTotalDataSize (  ) 

Definition at line 94 of file MediaServer.cpp.

long cmlabs::MediaServer::getTotalDataMemUse (  ) 

Definition at line 98 of file MediaServer.cpp.

int cmlabs::MediaServer::getCount (  ) 

Definition at line 102 of file MediaServer.cpp.

double cmlabs::MediaServer::getInputDataRate (  ) 

Definition at line 110 of file MediaServer.cpp.

double cmlabs::MediaServer::getOutputDataRate (  ) 

Definition at line 114 of file MediaServer.cpp.

double cmlabs::MediaServer::getTotalDataEverHandled (  ) 

Definition at line 106 of file MediaServer.cpp.

int cmlabs::MediaServer::getConnectionCount (  ) 

Definition at line 75 of file MediaServer.cpp.

ConnectionProfile cmlabs::MediaServer::getConnectionProfile ( const JString client  ) 

Definition at line 80 of file MediaServer.cpp.

InfoItem * cmlabs::MediaServer::getInfo (  ) 

Definition at line 118 of file MediaServer.cpp.

InfoItem * cmlabs::MediaServer::getInfoAllStats (  ) 

Definition at line 124 of file MediaServer.cpp.

JTime cmlabs::MediaServer::getOldestTimestamp (  ) 

Definition at line 636 of file MediaServer.cpp.

JTime cmlabs::MediaServer::getNewestTimestamp (  ) 

Definition at line 640 of file MediaServer.cpp.

ObjectCollection * cmlabs::MediaServer::getDataSampleList (  ) 

Definition at line 644 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getOldestSample ( const JString clientname  ) 

Definition at line 653 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getNewestSample ( const JString clientname  ) 

Definition at line 660 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getDataSample ( const JString clientname,
const JTime time 
)

Get one sample.

Definition at line 668 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getDataSample ( const JTime time  ) 

Definition at line 674 of file MediaServer.cpp.

ObjectCollection * cmlabs::MediaServer::getDataSamples ( const JString clientname,
const JTime t1,
const JTime t2 
)

Get many samples.

Definition at line 679 of file MediaServer.cpp.

ObjectCollection * cmlabs::MediaServer::getDataSamples ( const JTime t1,
const JTime t2 
)

Definition at line 691 of file MediaServer.cpp.

bool cmlabs::MediaServer::addDataSample ( const JString clientname,
DataSample sample 
)

Add one sample.

Definition at line 783 of file MediaServer.cpp.

bool cmlabs::MediaServer::addDataSample ( DataSample sample  ) 

Definition at line 788 of file MediaServer.cpp.

bool cmlabs::MediaServer::addDataSamples ( const JString clientname,
ObjectCollection samples 
)

Add many samples.

Definition at line 793 of file MediaServer.cpp.

bool cmlabs::MediaServer::addDataSamples ( ObjectCollection samples  ) 

Definition at line 807 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForFirstSampleAfter ( const JString clientname,
const JTime time,
long  ms 
)

Definition at line 757 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForFirstSampleAfter ( const JTime time,
long  ms 
)

Definition at line 763 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForLastSampleAfter ( const JString clientname,
const JTime time,
long  ms 
)

Definition at line 767 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForLastSampleAfter ( const JTime time,
long  ms 
)

Definition at line 773 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForSampleAt ( const JString clientname,
const JTime time,
long  ms 
)

Definition at line 695 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForSampleAt ( const JTime time,
long  ms 
)

Definition at line 711 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getSample ( const JString clientname,
const JString id 
)

Definition at line 718 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getFirstSampleAfter ( const JString clientname,
const JString id 
)

Definition at line 724 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForFirstSampleAfter ( const JString clientname,
const JString id,
long  ms 
)

Definition at line 730 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForLastSampleAfter ( const JString clientname,
const JString id,
long  ms 
)

Definition at line 736 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getSample ( const JString id  ) 

Definition at line 743 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::getFirstSampleAfter ( const JString id  ) 

Definition at line 746 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForFirstSampleAfter ( const JString id,
long  ms 
)

Definition at line 749 of file MediaServer.cpp.

DataSample * cmlabs::MediaServer::waitForLastSampleAfter ( const JString id,
long  ms 
)

Definition at line 752 of file MediaServer.cpp.

bool cmlabs::MediaServer::createChannel ( const JString name,
const JString fieldname 
)

Definition at line 1854 of file MediaServer.cpp.

bool cmlabs::MediaServer::destroyChannel ( const JString name  ) 

Definition at line 1858 of file MediaServer.cpp.

ObjectCollection * cmlabs::MediaServer::searchChannel ( const JString name,
double  val1,
double  val2 
)

Definition at line 1863 of file MediaServer.cpp.

bool cmlabs::MediaServer::subscribeChannel ( const JString connection,
const JString channel,
double  val1,
double  val2 
)

Definition at line 1868 of file MediaServer.cpp.

bool cmlabs::MediaServer::unsubscribeChannel ( const JString connection,
const JString channel,
double  val1,
double  val2 
)

Definition at line 1893 of file MediaServer.cpp.

bool cmlabs::MediaServer::unsubscribeChannel ( const JString connection,
SubscriptionEntry entry 
)

Definition at line 1898 of file MediaServer.cpp.

bool cmlabs::MediaServer::unsubscribeAllChannels ( const JString connection  ) 

Definition at line 1906 of file MediaServer.cpp.

bool cmlabs::MediaServer::subscriptionMatch ( ObjectCollection subs,
DataSample sample 
)

Definition at line 1878 of file MediaServer.cpp.

bool cmlabs::MediaServer::addDataStat ( const JString name,
long  upbytes,
long  downbytes,
const JTime time = JTime() 
) [protected]

Definition at line 512 of file MediaServer.cpp.


Member Data Documentation

Definition at line 128 of file MediaServer.h.

Definition at line 129 of file MediaServer.h.

Definition at line 140 of file MediaServer.h.

Reimplemented from cmlabs::JThread.

Definition at line 144 of file MediaServer.h.

Definition at line 145 of file MediaServer.h.

Definition at line 146 of file MediaServer.h.

Definition at line 147 of file MediaServer.h.

Definition at line 148 of file MediaServer.h.

Definition at line 149 of file MediaServer.h.

Definition at line 151 of file MediaServer.h.


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

Generated on Tue Jul 7 16:23:15 2009 for CoreLibrary by  doxygen 1.5.6