perfsonar-dev - r1344 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType
Subject: perfsonar development work
List archive
r1344 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType
Chronological Thread
- From:
- To:
- Subject: r1344 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType
- Date: Thu, 29 Jun 2006 08:27:50 -0400
Author: uros
Date: 2006-06-29 08:27:49 -0400 (Thu, 29 Jun 2006)
New Revision: 1344
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
Log:
Added result codes to all Exceptions thrown.
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
2006-06-29 11:05:20 UTC (rev 1343)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
2006-06-29 12:27:49 UTC (rev 1344)
@@ -150,7 +150,8 @@
if (configuration == null) {
- throw new SystemException(type + ": "
+ throw new SystemException("error.mp.no_configuration_reader",
+ type + ": "
+ "Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -158,7 +159,8 @@
if (logger == null) {
- throw new SystemException(type + ": "
+ throw new SystemException("error.mp.no_logger",
+ type + ": "
+ "Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -441,7 +443,8 @@
if (request == null) {
- throw new SystemException(type + ".validateTCMPRequest(): "
+ throw new SystemException("error.mp.validator.missing_request",
+ type + ".validateTCMPRequest(): "
+ "Request to the measurement executor cannot be null");
}
@@ -459,7 +462,7 @@
logger.fatal(
type + ".validateTCMPRequest: No data elements "
+ "found in request. At least one is required in the
message");
- throw new RequestException(
+ throw new RequestException("error.mp.validator.no_data_elements",
type + ".validateTCMPRequest: No data elements "
+ "found in request. At least one is required in the
message");
@@ -470,7 +473,7 @@
logger.fatal(
type + ".validateTCMPRequest: No metadata elements "
+ "found in request. At least one is required in the
message");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_metadata_elements",
type + ".validateTCMPRequest: No metadata elements "
+ "found in request. At least one is required in the
message");
@@ -489,7 +492,7 @@
logger.fatal(
type + ".validateTCMPRequest: No subject in metadata
element "
+ "of request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_metadata_subject",
type + ".validateTCMPRequest: No subject in metadata
element "
+ "of request.");
@@ -510,7 +513,7 @@
logger.fatal(
type + ".validateTCMPRequest: Either hostName or
ipAddress element "
+ "required in interface element.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_interface_hostName_or_ipAddress",
type + ".validateTCMPRequest: Either hostName or
ipAddress element "
+ "required in interface element.");
@@ -529,7 +532,7 @@
logger.fatal(
type + ".validateTCMPRequest: ifName element "
+ "required in interface element.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_interface_ifName",
type + ".validateTCMPRequest: ifName element "
+ "required in interface element.");
@@ -562,7 +565,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -572,7 +575,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPoint value is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_endPoint_value",
type + ".validateTCMPRequest: endPoint value is
required.");
}
@@ -582,7 +585,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPoint port is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_endPoint_port",
type + ".validateTCMPRequest: endPoint port is
required.");
}
@@ -598,7 +601,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPointPair element
requires "
+ "both src and dst elements.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_endPointPair_src_and_dst",
type + ".validateTCMPRequest: endPointPair element
requires "
+ "both src and dst elements.");
@@ -613,7 +616,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -623,7 +626,7 @@
logger.fatal(
type + ".validateTCMPRequest: src endPoint value is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_src_endPoint_value",
type + ".validateTCMPRequest: src endPoint value is
required.");
}
@@ -633,7 +636,7 @@
logger.fatal(
type + ".validateTCMPRequest: src endPoint port is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_src_endPoint_port",
type + ".validateTCMPRequest: src endPoint port is
required.");
}
@@ -644,7 +647,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -654,7 +657,7 @@
logger.fatal(
type + ".validateTCMPRequest: dst endPoint value is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_dst_endPoint_value",
type + ".validateTCMPRequest: dst endPoint value is
required.");
}
@@ -664,7 +667,7 @@
logger.fatal(
type + ".validateTCMPRequest: dst endPoint port is
required.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_dst_endPoint_port",
type + ".validateTCMPRequest: dst endPoint port is
required.");
}
@@ -676,7 +679,7 @@
type + ".validateTCMPRequest: Missing one of
(nmwg:interface, "
+ "nmwg:endPoint, nmwg:endPointPair) elements in subject
element "
+ "of request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_interface_or_endPoint_or_endPointPair",
type + ".validateTCMPRequest: Missing one of
(nmwg:interface, "
+ "nmwg:endPoint, nmwg:endPointPair) elements in subject
element "
+ "of request.");
@@ -706,7 +709,7 @@
logger.fatal(
type + ".validateTCMPRequest: No parameters in metadata
element "
+ "found in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_metadata_parameters",
type + ".validateTCMPRequest: No parameters in metadata
element "
+ "found in request.");
@@ -734,7 +737,7 @@
logger.fatal(
type + ".validateTCMPRequest: Unknown flow_s_type
parameter ("
+ flowSType + ") found in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_flow_s_type_parameter",
type + ".validateTCMPRequest: Unknown flow_s_type
parameter ("
+ flowSType + ") found in request.");
@@ -758,7 +761,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
flow_s_thre ("
+ flowSThre + ") is not positive Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_flow_s_thre_parameter",
type + ".validateTCMPRequest: Parameter
flow_s_thre ("
+ flowSThre + ") is not positive Integer.");
@@ -771,7 +774,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter flow_s_thre
("
+ flowSThreStr + ") could not be converted to
Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_flow_s_thre_parameter",
type + ".validateTCMPRequest: Parameter flow_s_thre
("
+ flowSThreStr + ") could not be converted to
Integer.");
@@ -805,7 +808,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charact + ") is not positive Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_characteristics_parameter",
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charact + ") is not positive Integer.");
@@ -818,7 +821,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charactStr + ") could not be converted to
Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_characteristics_parameter",
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charactStr + ") could not be converted to
Integer.");
@@ -842,7 +845,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
granularity ("
+ gran + ") is not positive Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_granularity_parameter",
type + ".validateTCMPRequest: Parameter
granularity ("
+ gran + ") is not positive Integer.");
@@ -855,7 +858,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter granularity
("
+ granStr + ") could not be converted to Integer.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_granularity_parameter",
type + ".validateTCMPRequest: Parameter granularity
("
+ granStr + ") could not be converted to Integer.");
@@ -873,7 +876,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing start_time
parameter "
+ "in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Missing start_time
parameter "
+ "in request.");
@@ -886,7 +889,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing start_time(child)
parameter "
+ "in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Missing start_time(child)
parameter "
+ "in request.");
@@ -908,7 +911,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter start_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Parameter start_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
@@ -919,7 +922,7 @@
logger.fatal(
type + ".validateTCMPRequest: Only 'unix' type of
start_time "
+ "is currently supported.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_start_time_type",
type + ".validateTCMPRequest: Only 'unix' type of
start_time "
+ "is currently supported.");
@@ -932,7 +935,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing end_time parameter
"
+ "in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Missing end_time parameter
"
+ "in request.");
@@ -945,7 +948,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing end_time(child)
parameter "
+ "in request.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Missing end_time(child)
parameter "
+ "in request.");
@@ -967,7 +970,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter end_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Parameter end_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
@@ -978,7 +981,7 @@
logger.fatal(
type + ".validateTCMPRequest: Only 'unix' type of
end_time "
+ "is currently supported.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.unsupported_end_time_type",
type + ".validateTCMPRequest: Only 'unix' type of
end_time "
+ "is currently supported.");
@@ -994,7 +997,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing commonTime element
inside datum element.");
- throw new RequestException(
+ throw new RequestException("error.mp.validator.no_commonTime",
type + ".validateTCMPRequest: Missing commonTime element
inside datum element.");
}
@@ -1005,7 +1008,7 @@
logger.fatal(
type + ".validateTCMPRequest: commonTime must contain at
least one datum child.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_datum_in_commonTime",
type + ".validateTCMPRequest: commonTime must contain at
least one datum child.");
}
@@ -1016,7 +1019,7 @@
logger.fatal(
type + ".validateTCMPRequest: First datum of commonTime
must contain filename attribute.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_first_datum_filename_attribute",
type + ".validateTCMPRequest: First datum of commonTime
must contain filename attribute.");
}
@@ -1027,7 +1030,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attribute of
first datum "
+ "contains file separator char.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_first_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attribute of
first datum "
+ "contains file separator char.");
@@ -1041,7 +1044,7 @@
logger.fatal(
type + ".validateTCMPRequest: commonTime must
contain two datum childs.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_second_datum_in_commonTime",
type + ".validateTCMPRequest: commonTime must
contain two datum childs.");
}
@@ -1052,7 +1055,7 @@
logger.fatal(
type + ".validateTCMPRequest: Second datum of
commonTime must contain filename attribute.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_second_datum_filename_attribute",
type + ".validateTCMPRequest: Second datum of
commonTime must contain filename attribute.");
}
@@ -1063,7 +1066,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attribute of
second datum "
+ "contains file separator char.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_second_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attribute of
second datum "
+ "contains file separator char.");
@@ -1075,7 +1078,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attributes of
first and second datum "
+ "should not be equal.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_second_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attributes of
first and second datum "
+ "should not be equal.");
@@ -1090,7 +1093,7 @@
logger.fatal(
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property missing in service.properties.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.no_pcap_storage_dir",
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property missing in service.properties.");
@@ -1101,7 +1104,7 @@
logger.fatal(
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property should point to a directory!");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_pcap_storage_dir",
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property should point to a directory!");
@@ -1125,7 +1128,7 @@
logger.fatal(
type + ".validateTCMPRequest: First datum filename (" +
req.getFirstFilenameDatum()
+ ") already exists. Use different datum filename.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.first_datum_filename_exists",
type + ".validateTCMPRequest: First datum filename (" +
req.getFirstFilenameDatum()
+ ") already exists. Use different datum filename.");
@@ -1138,7 +1141,7 @@
logger.fatal(
type + ".validateTCMPRequest: Second datum filename
(" + req.getSecondFilenameDatum()
+ ") already exists. Use different datum filename.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.second_datum_filename_exists",
type + ".validateTCMPRequest: Second datum filename
(" + req.getSecondFilenameDatum()
+ ") already exists. Use different datum filename.");
@@ -1180,7 +1183,7 @@
type + ".validateTCMPRequest:
service.mp.tcmp.remote.interfaces "
+ "property contains host:interface token (" +
hostIf
+ ") without ':' char.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.invalid_remote_interfaces_configuration",
type + ".validateTCMPRequest:
service.mp.tcmp.remote.interfaces "
+ "property contains host:interface token (" +
hostIf
+ ") without ':' char.");
@@ -1202,7 +1205,7 @@
type + ".validateTCMPRequest: Local Tracefile
capture requested, but interface "
+ req.getFirstEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.denied_trace_on_interface",
type + ".validateTCMPRequest: Local Tracefile
capture requested, but interface "
+ req.getFirstEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
@@ -1216,7 +1219,7 @@
type + ".validateTCMPRequest: Remote Tracefile capture
requested, but host:interface "
+ req.getFirstEndPointHost().toLowerCase() + ":" +
req.getFirstEndPointInterface()
+ " is not present in service.mp.tcmp.remote.interfaces
property.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.remote_host_interface_not_configured",
type + ".validateTCMPRequest: Remote Tracefile capture
requested, but host:interface "
+ req.getFirstEndPointHost().toLowerCase() + ":" +
req.getFirstEndPointInterface()
+ " is not present in service.mp.tcmp.remote.interfaces
property.");
@@ -1233,7 +1236,7 @@
type + ".validateTCMPRequest: Local Tracefile
capture requested, but second interface "
+ req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.denied_trace_on_second_interface",
type + ".validateTCMPRequest: Local Tracefile
capture requested, but second interface "
+ req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
@@ -1247,7 +1250,7 @@
type + ".validateTCMPRequest: Remote Tracefile
capture requested, but second host:interface "
+ req.getSecondEndPointHost().toLowerCase() + ":" +
req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.remote.interfaces property.");
- throw new RequestException(
+ throw new
RequestException("error.mp.validator.second_remote_interface_not_configured",
type + ".validateTCMPRequest: Remote Tracefile
capture requested, but second host:interface "
+ req.getSecondEndPointHost().toLowerCase() + ":" +
req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.remote.interfaces property.");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
2006-06-29 11:05:20 UTC (rev 1343)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
2006-06-29 12:27:49 UTC (rev 1344)
@@ -153,7 +153,8 @@
"TCMPTypeServiceEngine.takeAction: ActionType specified:
"
+ actionType + " is not supported");
- throw new SystemException("TCMPTypeServiceEngine: "
+ throw new SystemException("error.mp.action_not_suported",
+ "TCMPTypeServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
}
@@ -228,7 +229,8 @@
"TCMPTypeServiceEngine.makeMeasurement: Data with id
"
+ data.getId() + " has a blank metadataIdRef");
- throw new SystemException("TCMPTypeServiceEngine: "
+ throw new
SystemException("error.mp.data_missing_metadataIdRef",
+ "TCMPTypeServiceEngine: "
+ "Data with id "+ data.getId()
+ " has a blank metadataIdRef");
}
- r1344 - trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType, svnlog, 06/29/2006
Archive powered by MHonArc 2.6.16.