(file) Return to CIMExportClient.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ExportClient

  1 martin 1.56 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.57 //
  3 martin 1.56 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.57 //
 10 martin 1.56 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.57 //
 17 martin 1.56 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.57 //
 20 martin 1.56 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.57 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.56 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.57 //
 28 martin 1.56 //////////////////////////////////////////////////////////////////////////
 29 mike   1.2  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #include <Pegasus/Common/Config.h>
 33 kumpf  1.7  #include <Pegasus/Common/Constants.h>
 34 mike   1.2  #include <Pegasus/Common/HTTPConnection.h>
 35             #include <Pegasus/Common/XmlWriter.h>
 36             #include <Pegasus/Common/TimeValue.h>
 37             #include <Pegasus/Common/Exception.h>
 38 kumpf  1.8  #include <Pegasus/Common/PegasusVersion.h>
 39 thilo.boehm 1.44 #include <Pegasus/Common/AutoPtr.h>
 40 kumpf       1.45 #include <Pegasus/Common/MessageLoader.h>
 41 dave.sudlik 1.50 #include <Pegasus/Common/HostAddress.h>
 42 kumpf       1.8  
 43 mike        1.2  #include "CIMExportRequestEncoder.h"
 44                  #include "CIMExportResponseDecoder.h"
 45                  #include "CIMExportClient.h"
 46                  
 47                  #include <iostream>
 48                  
 49                  PEGASUS_USING_STD;
 50                  
 51                  PEGASUS_NAMESPACE_BEGIN
 52                  
 53                  CIMExportClient::CIMExportClient(
 54 mday        1.4     Monitor* monitor,
 55                     HTTPConnector* httpConnector,
 56 kumpf       1.12    Uint32 timeoutMilliseconds)
 57 kumpf       1.45    :
 58 kumpf       1.14    MessageQueue(PEGASUS_QUEUENAME_EXPORTCLIENT),
 59                     _monitor(monitor),
 60 mday        1.3     _httpConnector(httpConnector),
 61 kumpf       1.14    _httpConnection(0),
 62 kumpf       1.12    _timeoutMilliseconds(timeoutMilliseconds),
 63 mday        1.3     _connected(false),
 64 thilo.boehm 1.44    _doReconnect(false),
 65 mday        1.3     _responseDecoder(0),
 66                     _requestEncoder(0)
 67 mike        1.2  {
 68 kumpf       1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::CIMExportClient()");
 69                      PEG_METHOD_EXIT();
 70 mike        1.2  }
 71                  
 72                  CIMExportClient::~CIMExportClient()
 73                  {
 74 kumpf       1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::~CIMExportClient()");
 75 konrad.r    1.15 
 76 kumpf       1.26     disconnect();
 77                  
 78                      PEG_METHOD_EXIT();
 79 mike        1.2  }
 80                  
 81 kumpf       1.14 void CIMExportClient::_connect()
 82 mday        1.4  {
 83 kumpf       1.34     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::_connect()");
 84 kumpf       1.26 
 85 kumpf       1.34     // Create response decoder:
 86 kumpf       1.45 
 87 kumpf       1.34     _responseDecoder = new CIMExportResponseDecoder(
 88                          this, _requestEncoder, &_authenticator);
 89 kumpf       1.45 
 90 kumpf       1.34     // Attempt to establish a connection:
 91 kumpf       1.45 
 92 kumpf       1.34     try
 93                      {
 94 kumpf       1.45         _httpConnection = _httpConnector->connect(_connectHost,
 95                              _connectPortNumber,
 96 kumpf       1.34             _connectSSLContext.get(),
 97 kumpf       1.52             _timeoutMilliseconds,
 98 kumpf       1.34             _responseDecoder);
 99                      }
100                      catch (...)
101                      {
102                          // Some possible exceptions are CannotCreateSocketException,
103                          // CannotConnectException, and InvalidLocatorException
104 kumpf       1.14         delete _responseDecoder;
105 kumpf       1.26         PEG_METHOD_EXIT();
106 kumpf       1.34         throw;
107                      }
108 kumpf       1.45 
109 kumpf       1.34     // Create request encoder:
110 kumpf       1.45 
111 kumpf       1.34     String connectHost = _connectHost;
112 dave.sudlik 1.50 
113                  #ifdef PEGASUS_ENABLE_IPV6
114                      if (HostAddress::isValidIPV6Address(connectHost))
115                      {
116                          connectHost = "[" + connectHost + "]";
117                      }
118                  #endif
119                  
120 kumpf       1.34     if (connectHost.size())
121                      {
122                          char portStr[32];
123                          sprintf(portStr, ":%u", _connectPortNumber);
124                          connectHost.append(portStr);
125                      }
126 kumpf       1.29 
127 kumpf       1.34     _requestEncoder = new CIMExportRequestEncoder(
128                          _httpConnection, connectHost, &_authenticator);
129 mike        1.2  
130 kumpf       1.45     _responseDecoder->setEncoderQueue(_requestEncoder);
131 mike        1.2  
132 kumpf       1.45     _doReconnect = false;
133 thilo.boehm 1.44 
134 kumpf       1.34     _connected = true;
135 kumpf       1.26 
136 marek       1.42     _httpConnection->setSocketWriteTimeout(_timeoutMilliseconds/1000+1);
137                  
138 kumpf       1.34     PEG_METHOD_EXIT();
139 mike        1.2  }
140                  
141 kumpf       1.23 void CIMExportClient::_disconnect()
142                  {
143 kumpf       1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::_disconnect()");
144                  
145 kumpf       1.23     if (_connected)
146                      {
147                          //
148                          // destroy response decoder
149                          //
150 kumpf       1.41         delete _responseDecoder;
151                          _responseDecoder = 0;
152 kumpf       1.23 
153                          //
154                          // Close the connection
155                          //
156                          if (_httpConnector)
157                          {
158                              _httpConnector->disconnect(_httpConnection);
159                              _httpConnection = 0;
160                          }
161                  
162                          //
163                          // destroy request encoder
164                          //
165 kumpf       1.41         delete _requestEncoder;
166                          _requestEncoder = 0;
167 kumpf       1.23 
168                          _connected = false;
169                      }
170                  
171 kumpf       1.45     // Reconnect no longer applies
172 thilo.boehm 1.44     _doReconnect=false;
173                  
174 kumpf       1.46     // Let go of the cached request message if we have one
175                      _authenticator.setRequestMessage(0);
176                  
177 kumpf       1.26     PEG_METHOD_EXIT();
178 kumpf       1.14 }
179                  
180                  void CIMExportClient::connect(
181                      const String& host,
182                      const Uint32 portNumber)
183                  {
184 kumpf       1.45     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::connect()");
185                  
186                      // If already connected, bail out!
187                      if (_connected)
188                      {
189                          PEG_METHOD_EXIT();
190                          throw AlreadyConnectedException();
191                      }
192                  
193 kumpf       1.14     //
194                      // If the host is empty, set hostName to "localhost"
195                      //
196                      String hostName = host;
197                      if (host == String::EMPTY)
198                      {
199                          hostName = "localhost";
200                      }
201                  
202                      //
203                      // Set authentication information
204                      //
205 kumpf       1.23     _authenticator.clear();
206 kumpf       1.14 
207 kumpf       1.28     _connectSSLContext.reset(0);
208 kumpf       1.14     _connectHost = hostName;
209                      _connectPortNumber = portNumber;
210                  
211                      _connect();
212 kumpf       1.26     PEG_METHOD_EXIT();
213 kumpf       1.14 }
214                  
215 kumpf       1.17 void CIMExportClient::connect(
216                      const String& host,
217                      const Uint32 portNumber,
218                      const SSLContext& sslContext)
219                  {
220 kumpf       1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::connect()");
221                  
222                      // If already connected, bail out!
223 kumpf       1.17 
224 kumpf       1.26     if (_connected)
225                      {
226                         PEG_METHOD_EXIT();
227                         throw AlreadyConnectedException();
228                      }
229 kumpf       1.17 
230                      //
231                      // If the host is empty, set hostName to "localhost"
232                      //
233                      String hostName = host;
234                      if (host == String::EMPTY)
235                      {
236                          hostName = "localhost";
237                      }
238                  
239                      //
240                      // Set authentication information
241                      //
242 kumpf       1.23     _authenticator.clear();
243 kumpf       1.17 
244 kumpf       1.28     _connectSSLContext.reset(new SSLContext(sslContext));
245 kumpf       1.17     _connectHost = hostName;
246                      _connectPortNumber = portNumber;
247                  
248                      try
249                      {
250                          _connect();
251                      }
252 kumpf       1.34     catch (...)
253 kumpf       1.17     {
254 kumpf       1.28         _connectSSLContext.reset();
255 kumpf       1.26         PEG_METHOD_EXIT();
256 kumpf       1.17         throw;
257                      }
258 kumpf       1.26     PEG_METHOD_EXIT();
259 kumpf       1.17 }
260                  
261 kumpf       1.14 void CIMExportClient::disconnect()
262 mike        1.2  {
263 kumpf       1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::disconnect()");
264 kumpf       1.23     _disconnect();
265                      _authenticator.clear();
266 kumpf       1.28     _connectSSLContext.reset();
267 kumpf       1.26     PEG_METHOD_EXIT();
268 mike        1.2  }
269                  
270                  void CIMExportClient::exportIndication(
271 mday        1.4     const String& url,
272 chuck       1.16    const CIMInstance& instanceName,
273 kumpf       1.39    const ContentLanguageList& contentLanguages)
274 mike        1.2  {
275 carolann.graves 1.35     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::exportIndication()");
276 kumpf           1.26 
277 carolann.graves 1.35     try
278                          {
279                              // encode request
280                              CIMRequestMessage* request = new CIMExportIndicationRequestMessage(
281                                  String::EMPTY,
282                                  url,
283                                  instanceName,
284                                  QueueIdStack(),
285                                  String::EMPTY,
286                                  String::EMPTY);
287 se.gupta        1.27 
288 carolann.graves 1.35         request->operationContext.set
289                                  (ContentLanguageListContainer(contentLanguages));
290 mike            1.2  
291 marek           1.53         PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,
292 w.otsuka        1.49             "Exporting %s Indication for destination %s:%d%s",
293                                  (const char*)(instanceName.getClassName().getString().
294                                  getCString()),
295                                  (const char*)(_connectHost.getCString()), _connectPortNumber,
296                                  (const char*)(url.getCString())));
297                      
298 carolann.graves 1.35         Message* message = _doRequest(request,
299                                  CIM_EXPORT_INDICATION_RESPONSE_MESSAGE);
300 mike            1.2  
301 marek           1.53         PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,
302 w.otsuka        1.49             "%s Indication for destination %s:%d%s exported successfully",
303                                  (const char*)(instanceName.getClassName().getString().
304                                  getCString()),
305                                  (const char*)(_connectHost.getCString()), _connectPortNumber,
306                                  (const char*)(url.getCString())));
307                      
308 kumpf           1.45         CIMExportIndicationResponseMessage* response =
309 carolann.graves 1.35             (CIMExportIndicationResponseMessage*)message;
310 kumpf           1.45 
311 carolann.graves 1.35         AutoPtr<CIMExportIndicationResponseMessage> ap(response);
312                          }
313 kumpf           1.45     catch (const Exception& e)
314 carolann.graves 1.35     {
315 thilo.boehm     1.54         PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
316                                  "Failed to export indication: %s",
317                                  (const char*)e.getMessage().getCString()));
318 carolann.graves 1.35         throw;
319                          }
320                          catch (...)
321                          {
322 marek           1.53         PEG_TRACE_CSTRING (TRC_DISCARDED_DATA, Tracer::LEVEL1,
323 carolann.graves 1.35             "Failed to export indication");
324                              throw;
325                          }
326                          PEG_METHOD_EXIT();
327 mike            1.2  }
328                      
329 kumpf           1.14 Message* CIMExportClient::_doRequest(
330 kumpf           1.45     CIMRequestMessage* pRequest,
331 kumpf           1.51     MessageType expectedResponseMessageType)
332 mike            1.2  {
333 kumpf           1.26     PEG_METHOD_ENTER (TRC_EXPORT_CLIENT, "CIMExportClient::_doRequest()");
334                      
335 kumpf           1.45     AutoPtr<CIMRequestMessage> request(pRequest);
336 thilo.boehm     1.44 
337 kumpf           1.45     if (!_connected && !_doReconnect)
338 thilo.boehm     1.44     {
339                              PEG_METHOD_EXIT();
340                              throw NotConnectedException();
341                          }
342                      
343 kumpf           1.45     if (_doReconnect)
344 kumpf           1.14     {
345 thilo.boehm     1.44         try
346                              {
347                                  _connect();
348 kumpf           1.45             _doReconnect = false;
349                              }
350                              catch (const Exception& e)
351 thilo.boehm     1.44         {
352 thilo.boehm     1.54             PEG_TRACE((TRC_EXPORT_CLIENT, Tracer::LEVEL1,
353 denise.eckstein 1.55                 "Failed to connect to indication listener: %s",
354 thilo.boehm     1.54                 (const char*)e.getMessage().getCString()));
355 thilo.boehm     1.44             PEG_METHOD_EXIT();
356                                  throw;
357 kumpf           1.45         }
358                              catch (...)
359 thilo.boehm     1.44         {
360 marek           1.53             PEG_TRACE_CSTRING(TRC_EXPORT_CLIENT, Tracer::LEVEL1,
361 kumpf           1.45                 "Failed to connect to indication listener.");
362 thilo.boehm     1.44             PEG_METHOD_EXIT();
363                                  throw;
364                              }
365 kumpf           1.14     }
366 thilo.boehm     1.44 
367                      
368 kumpf           1.14     String messageId = XmlWriter::getNextMessageId();
369                          const_cast<String &>(request->messageId) = messageId;
370                      
371 kumpf           1.23     _authenticator.setRequestMessage(0);
372 kumpf           1.14 
373                          // ATTN-RK-P2-20020416: We should probably clear out the queue first.
374                          PEGASUS_ASSERT(getCount() == 0);  // Shouldn't be any messages in our queue
375                      
376                          //
377 kumpf           1.22     //  Set HTTP method in request to POST
378 kumpf           1.14     //
379 kumpf           1.45     request->setHttpMethod(HTTP_METHOD__POST);
380 kumpf           1.14 
381 thilo.boehm     1.44     _requestEncoder->enqueue(request.release());
382 kumpf           1.14 
383                          Uint64 startMilliseconds = TimeValue::getCurrentTime().toMilliseconds();
384                          Uint64 nowMilliseconds = startMilliseconds;
385                          Uint64 stopMilliseconds = nowMilliseconds + _timeoutMilliseconds;
386                      
387 kumpf           1.45     while (nowMilliseconds < stopMilliseconds)
388 kumpf           1.14     {
389 thilo.boehm     1.44         //
390                              // Wait until the timeout expires or an event occurs:
391                              //
392 kumpf           1.31         _monitor->run(Uint32(stopMilliseconds - nowMilliseconds));
393 kumpf           1.14 
394 thilo.boehm     1.44         //
395                              // Check to see if incoming queue has a message
396                              //
397                      
398 kumpf           1.45         AutoPtr<Message> response(dequeue());
399 kumpf           1.14 
400 kumpf           1.45         if (response.get() != 0)
401 thilo.boehm     1.44         {
402 kumpf           1.14             // Shouldn't be any more messages in our queue
403                                  PEGASUS_ASSERT(getCount() == 0);
404                      
405                                  //
406 kumpf           1.45             // Close the connection if response contained a "Connection: Close"
407                                  // header (e.g. at authentication challenge)
408 j.alex          1.37             //
409 kumpf           1.45             if (response->getCloseConnect() == true)
410 thilo.boehm     1.44             {
411                                      _disconnect();
412 kumpf           1.45                 _doReconnect = true;
413 j.alex          1.38                 response->setCloseConnect(false);
414 j.alex          1.37             }
415                      
416 kumpf           1.46             //
417                                  //  Future:  If M-POST is used and HTTP response is 501 Not
418                                  //  Implemented or 510 Not Extended, retry with POST method
419                                  //
420                      
421 kumpf           1.45             if (response->getType() == CLIENT_EXCEPTION_MESSAGE)
422 kumpf           1.14             {
423                                      Exception* clientException =
424 kumpf           1.45                     ((ClientExceptionMessage*)response.get())->clientException;
425                      
426 marek           1.53                 PEG_TRACE_CSTRING(TRC_EXPORT_CLIENT, Tracer::LEVEL2,
427 kumpf           1.45                     "Client Exception Message received.");
428 kumpf           1.21 
429 joyce.j         1.33                 AutoPtr<Exception> d(clientException);
430 kumpf           1.21 
431                                      //
432                                      // Determine and throw the specific class of client exception
433                                      //
434                      
435                                      CIMClientMalformedHTTPException* malformedHTTPException =
436                                          dynamic_cast<CIMClientMalformedHTTPException*>(
437 thilo.boehm     1.44                     clientException);
438 kumpf           1.45                 if (malformedHTTPException)
439 kumpf           1.21                 {
440 kumpf           1.26                     PEG_METHOD_EXIT();
441 kumpf           1.21                     throw *malformedHTTPException;
442                                      }
443                      
444                                      CIMClientHTTPErrorException* httpErrorException =
445                                          dynamic_cast<CIMClientHTTPErrorException*>(
446 thilo.boehm     1.44                     clientException);
447 kumpf           1.45                 if (httpErrorException)
448 kumpf           1.21                 {
449 kumpf           1.26                     PEG_METHOD_EXIT();
450 kumpf           1.21                     throw *httpErrorException;
451                                      }
452                      
453                                      CIMClientXmlException* xmlException =
454                                          dynamic_cast<CIMClientXmlException*>(clientException);
455 kumpf           1.45                 if (xmlException)
456 kumpf           1.21                 {
457 kumpf           1.26                     PEG_METHOD_EXIT();
458 kumpf           1.21                     throw *xmlException;
459                                      }
460                      
461                                      CIMClientResponseException* responseException =
462                                          dynamic_cast<CIMClientResponseException*>(clientException);
463 kumpf           1.45                 if (responseException)
464 kumpf           1.21                 {
465 kumpf           1.26                     PEG_METHOD_EXIT();
466 kumpf           1.21                     throw *responseException;
467                                      }
468                      
469 kumpf           1.26                 PEG_METHOD_EXIT();
470 kumpf           1.14                 throw *clientException;
471 kumpf           1.45             }
472                                  else if (response->getType() == expectedResponseMessageType)
473 kumpf           1.14             {
474 marek           1.48                 PEG_TRACE_CSTRING(TRC_EXPORT_CLIENT, Tracer::LEVEL4,
475 carolann.graves 1.35                     "Received expected indication response message.");
476 kumpf           1.45                 CIMResponseMessage* cimResponse =
477 thilo.boehm     1.44                     (CIMResponseMessage*)response.get();
478 kumpf           1.45                 if (cimResponse->messageId != messageId)
479 kumpf           1.14                 {
480 thilo.boehm     1.44                     MessageLoaderParms mlParms(
481 kumpf           1.45                         "ExportClient.CIMExportClient.MISMATCHED_RESPONSE_ID",
482                                              "Mismatched response message ID:  Got \"$0\", "
483                                                  "expected \"$1\".",
484 thilo.boehm     1.44                         cimResponse->messageId, messageId);
485                                          String mlString(MessageLoader::getMessage(mlParms));
486                      
487                                          CIMClientResponseException responseException(mlString);
488                      
489                                          PEG_METHOD_EXIT();
490                                          throw responseException;
491 kumpf           1.14                 }
492 kumpf           1.45                 if (cimResponse->cimException.getCode() != CIM_ERR_SUCCESS)
493 kumpf           1.14                 {
494 marek           1.53                     PEG_TRACE_CSTRING(TRC_EXPORT_CLIENT, Tracer::LEVEL1,
495 kumpf           1.26                         "Received indication failure message.");
496 kumpf           1.14                     CIMException cimException(
497                                              cimResponse->cimException.getCode(),
498                                              cimResponse->cimException.getMessage());
499 kumpf           1.26                     PEG_METHOD_EXIT();
500 thilo.boehm     1.44                     throw cimException;
501 kumpf           1.14                 }
502 kumpf           1.26                 PEG_METHOD_EXIT();
503 thilo.boehm     1.44                 return response.release();
504 kumpf           1.45             }
505                                  else if (dynamic_cast<CIMRequestMessage*>(response.get()) != 0)
506 j.alex          1.38             {
507 thilo.boehm     1.44                 //
508 kumpf           1.45                 // Respond to an authentication challenge.
509                                      // Reconnect if the connection was closed.
510                                      //
511                                      if (_doReconnect)
512 thilo.boehm     1.44                 {
513 kumpf           1.45                     _connect();
514 thilo.boehm     1.44                 }
515                      
516 kumpf           1.45                 _requestEncoder->enqueue(response.release());
517 thilo.boehm     1.44 
518 j.alex          1.38                 nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();
519                                      stopMilliseconds = nowMilliseconds + _timeoutMilliseconds;
520                                      continue;
521 kumpf           1.45             }
522                                  else
523 kumpf           1.14             {
524 thilo.boehm     1.44                 MessageLoaderParms mlParms(
525 kumpf           1.45                     "ExportClient.CIMExportClient.MISMATCHED_RESPONSE",
526 thilo.boehm     1.44                     "Mismatched response message type.");
527                                      String mlString(MessageLoader::getMessage(mlParms));
528 humberto        1.18 
529 thilo.boehm     1.44                 CIMClientResponseException responseException(mlString);
530 kumpf           1.26 
531 kumpf           1.58                 PEG_TRACE((TRC_EXPORT_CLIENT, Tracer::LEVEL1,
532 thilo.boehm     1.54                            (const char*)mlString.getCString()));
533 kumpf           1.26 
534 thilo.boehm     1.44                 PEG_METHOD_EXIT();
535                                      throw responseException;
536 kumpf           1.14             }
537 thilo.boehm     1.44         }
538 kumpf           1.14 
539                              nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds();
540                          }
541                      
542 kumpf           1.46     //
543                          // Reconnect to reset the connection (disregard late response)
544                          //
545                      
546 marek           1.53     PEG_TRACE_CSTRING(TRC_EXPORT_CLIENT, Tracer::LEVEL2,
547 thilo.boehm     1.44         "Connection to the listener timed out.");
548 kumpf           1.46 
549                          _disconnect();
550                          _authenticator.resetChallengeStatus();
551                          _doReconnect = true;
552                      
553 kumpf           1.14     //
554                          // Throw timed out exception:
555                          //
556 kumpf           1.46     PEG_METHOD_EXIT();
557 kumpf           1.14     throw ConnectionTimeoutException();
558 mike            1.2  }
559                      
560                      PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2