version 1.56.2.1, 2006/07/27 23:11:50
|
version 1.57, 2006/07/27 08:37:24
|
|
|
const CIMPropertyList& propertyList | const CIMPropertyList& propertyList |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(instanceName); |
|
|
|
AutoPtr<CIMRequestMessage> request(new CIMGetInstanceRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMGetInstanceRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMObjectPath& instanceName | const CIMObjectPath& instanceName |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(instanceName); |
|
AutoPtr<CIMRequestMessage> request(new CIMDeleteInstanceRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMDeleteInstanceRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMInstance& newInstance | const CIMInstance& newInstance |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(newInstance.getPath()); |
|
AutoPtr<CIMRequestMessage> request(new CIMCreateInstanceRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMCreateInstanceRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMPropertyList& propertyList | const CIMPropertyList& propertyList |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(modifiedInstance.getPath()); |
|
AutoPtr<CIMRequestMessage> request(new CIMModifyInstanceRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMModifyInstanceRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMPropertyList& propertyList | const CIMPropertyList& propertyList |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(objectName); |
|
AutoPtr<CIMRequestMessage> request(new CIMAssociatorsRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMAssociatorsRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const String& resultRole | const String& resultRole |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(objectName); |
|
AutoPtr<CIMRequestMessage> request(new CIMAssociatorNamesRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMAssociatorNamesRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMPropertyList& propertyList | const CIMPropertyList& propertyList |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(objectName); |
|
AutoPtr<CIMRequestMessage> request(new CIMReferencesRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMReferencesRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const String& role | const String& role |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(objectName); |
|
AutoPtr<CIMRequestMessage> request(new CIMReferenceNamesRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMReferenceNamesRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMName& propertyName | const CIMName& propertyName |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(instanceName); |
|
AutoPtr<CIMRequestMessage> request(new CIMGetPropertyRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMGetPropertyRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
const CIMValue& newValue | const CIMValue& newValue |
) | ) |
{ | { |
compareObjectPathtoCurrentConnection(instanceName); |
|
AutoPtr<CIMRequestMessage> request(new CIMSetPropertyRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMSetPropertyRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
// solved with PEP#139 Stage1 as other CIMOMs contained in the object path | // solved with PEP#139 Stage1 as other CIMOMs contained in the object path |
// will cause a TypeMisMatchException | // will cause a TypeMisMatchException |
| |
compareObjectPathtoCurrentConnection(instanceName); |
|
AutoPtr<CIMRequestMessage> request(new CIMInvokeMethodRequestMessage( | AutoPtr<CIMRequestMessage> request(new CIMInvokeMethodRequestMessage( |
String::EMPTY, | String::EMPTY, |
nameSpace, | nameSpace, |
|
|
} | } |
| |
nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds(); | nowMilliseconds = TimeValue::getCurrentTime().toMilliseconds(); |
Threads::yield(); |
pegasus_yield(); |
} | } |
| |
// | // |
|
|
return hostname; | return hostname; |
} | } |
| |
void CIMClientRep::compareObjectPathtoCurrentConnection(const CIMObjectPath& obj) |
|
{ |
|
|
|
String ObjHost = obj.getHost(); |
|
// test if a host is given at all, if not everything is fine and we leave it at that |
|
if (ObjHost==String::EMPTY) |
|
{ |
|
return; |
|
} |
|
|
|
MessageLoaderParms typeMismatchMessage; |
|
// splitting the port from hostname as we have to compare both separate |
|
int i = ObjHost.find(":"); |
|
String ObjPort = String::EMPTY; |
|
// only if there is a ":" we should split a port address from hostname string |
|
if (i > 0) |
|
{ |
|
ObjPort = ObjHost.subString(i+1); |
|
ObjHost.remove(i); |
|
|
|
// lets see who we are really connected to |
|
// should stand in UInt32 _connectPortNumber and String _connectHost; |
|
|
|
// comparing the stuff |
|
// first the easy part, comparing the ports |
|
Uint32 objectport = strtoul((const char*) ObjPort.getCString(), NULL, 0); |
|
|
|
// if port in object path does not equal port of connection throw a TypeMismatch Exception |
|
if (objectport != _connectPortNumber) |
|
{ |
|
typeMismatchMessage = MessageLoaderParms("Client.CIMClientRep.TYPEMISMATCH_PORTMISMATCH", |
|
"Failed validation of CIM object path: port of CIMClient connection($0) and port of object path($1) not equal", |
|
_connectPortNumber, objectport); |
|
throw TypeMismatchException(typeMismatchMessage); |
|
} |
|
} |
|
} |
|
|
|
| |
void CIMClientRep::registerClientOpPerformanceDataHandler(ClientOpPerformanceDataHandler & handler) | void CIMClientRep::registerClientOpPerformanceDataHandler(ClientOpPerformanceDataHandler & handler) |
{ | { |