File: Poco.Net.HTTPSessionFactory.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (97 lines) | stat: -rw-r--r-- 8,273 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::HTTPSessionFactory</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class HTTPSessionFactory</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> HTTPClient<br />
<b>Header:</b> Poco/Net/HTTPSessionFactory.h</p>
<h2>Description</h2>
<div class="description">
<p>A factory for <a href="Poco.Net.HTTPClientSession.html" title="class Poco::Net::HTTPClientSession">HTTPClientSession</a> objects. </p>
<p>Given a <a href="Poco.URI.html" title="class Poco::URI">URI</a>, this class creates a <a href="Poco.Net.HTTPClientSession.html" title="class Poco::Net::HTTPClientSession">HTTPClientSession</a> (for http) or a <a href="Poco.Net.HTTPSClientSession.html" title="class Poco::Net::HTTPSClientSession">HTTPSClientSession</a> (for https) for accessing the <a href="Poco.URI.html" title="class Poco::URI">URI</a>. </p>
<p>The actual work of creating the session is done by <a href="Poco.Net.HTTPSessionInstantiator.html" title="class Poco::Net::HTTPSessionInstantiator">HTTPSessionInstantiator</a> objects that must be registered with a <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.HTTPSessionFactory.html#13228" title="Poco::Net::HTTPSessionFactory::createClientSession()">createClientSession</a>, <a href="Poco.Net.HTTPSessionFactory.html#13235" title="Poco::Net::HTTPSessionFactory::defaultFactory()">defaultFactory</a>, <a href="Poco.Net.HTTPSessionFactory.html#13230" title="Poco::Net::HTTPSessionFactory::proxyHost()">proxyHost</a>, <a href="Poco.Net.HTTPSessionFactory.html#13231" title="Poco::Net::HTTPSessionFactory::proxyPort()">proxyPort</a>, <a href="Poco.Net.HTTPSessionFactory.html#13221" title="Poco::Net::HTTPSessionFactory::registerProtocol()">registerProtocol</a>, <a href="Poco.Net.HTTPSessionFactory.html#13232" title="Poco::Net::HTTPSessionFactory::setProxy()">setProxy</a>, <a href="Poco.Net.HTTPSessionFactory.html#13226" title="Poco::Net::HTTPSessionFactory::supportsProtocol()">supportsProtocol</a>, <a href="Poco.Net.HTTPSessionFactory.html#13224" title="Poco::Net::HTTPSessionFactory::unregisterProtocol()">unregisterProtocol</a></p>
<h2>Constructors</h2>
<h3><a name="13216">HTTPSessionFactory</a></h3>
<p class="decl"><a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>. </p>
</div>
<h3><a name="13217">HTTPSessionFactory</a></h3>
<p class="decl"><a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; proxyHost,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> proxyPort<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a> and sets the proxy host and port. </p>
</div>
<h2>Destructor</h2>
<h3><a name="13220">~HTTPSessionFactory</a></h3>
<p class="decl">~<a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="13228">createClientSession</a></h3>
<p class="decl"><a href="Poco.Net.HTTPClientSession.html" title="class Poco::Net::HTTPClientSession">HTTPClientSession</a> * createClientSession(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.URI.html" title="class Poco::URI">Poco::URI</a> &amp; uri<br />);</p>
<div class="description">
<p>Creates a client session for the given uri scheme. Throws exception if no factory is registered for the given scheme </p>
</div>
<h3><a name="13235">defaultFactory</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a> &amp; defaultFactory();</p>
<div class="description">
<p>Returns the default <a href="Poco.Net.HTTPSessionFactory.html" title="class Poco::Net::HTTPSessionFactory">HTTPSessionFactory</a>. </p>
</div>
<h3><a name="13230">proxyHost</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">const std::string &amp; proxyHost() const;</p>
<div class="description">
<p>Returns the proxy host, if one has been set, or an empty string otherwise. </p>
</div>
<h3><a name="13231">proxyPort</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> proxyPort() const;</p>
<div class="description">
<p>Returns the proxy port number, if one has been set, or zero otherwise. </p>
</div>
<h3><a name="13221">registerProtocol</a></h3>
<p class="decl">void registerProtocol(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; protocol,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.HTTPSessionInstantiator.html" title="class Poco::Net::HTTPSessionInstantiator">HTTPSessionInstantiator</a> * pSessionInstantiator<br />);</p>
<div class="description">
<p>Registers the session instantiator for the given protocol. The factory takes ownership of the SessionInstantiator. </p>
<p>A protocol can be registered more than once. However, only the instantiator that has been registered first is used. Also, for each call to <a href="Poco.Net.HTTPSessionFactory.html#13221" title="Poco::Net::HTTPSessionFactory::registerProtocol()">registerProtocol</a>(), a corresponding call to <a href="Poco.Net.HTTPSessionFactory.html#13224" title="Poco::Net::HTTPSessionFactory::unregisterProtocol()">unregisterProtocol</a>() must be made. </p>
</div>
<h3><a name="13232">setProxy</a></h3>
<p class="decl">void setProxy(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; proxyHost,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> proxyPort<br />);</p>
<div class="description">
<p>Sets the proxy host and port number. </p>
</div>
<h3><a name="13226">supportsProtocol</a></h3>
<p class="decl">bool supportsProtocol(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; protocol<br />);</p>
<div class="description">
<p>Returns true if a session instantiator for the given protocol has been registered. </p>
</div>
<h3><a name="13224">unregisterProtocol</a></h3>
<p class="decl">void unregisterProtocol(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; protocol<br />);</p>
<div class="description">
<p>Removes the registration of a protocol. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if no instantiator has been registered for the given protocol. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>