diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.classpath b/dev/io.openliberty.checkpoint_fat_wsoc/.classpath new file mode 100644 index 00000000000..92411b358b2 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.project b/dev/io.openliberty.checkpoint_fat_wsoc/.project new file mode 100644 index 00000000000..1a40acdd49b --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.project @@ -0,0 +1,23 @@ + + + io.openliberty.checkpoint_fat_wsoc + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + \ No newline at end of file diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.settings/bndtools.core.prefs b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/bndtools.core.prefs new file mode 100644 index 00000000000..789fa99991a --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/bndtools.core.prefs @@ -0,0 +1,2 @@ +compileErrorAction=build +eclipse.preferences.version=1 diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.core.resources.prefs b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..25d9425fe34 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#Ant properties +#Automatically generated by the ant prepare.settings.files task +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.core.prefs b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..ee1e988d5eb --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,294 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=ignore +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=2 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=2 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=2 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=18 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=false +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=180 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=4 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=8 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=180 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.ui.prefs b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..c0003634609 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,60 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=false +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/bnd.bnd b/dev/io.openliberty.checkpoint_fat_wsoc/bnd.bnd new file mode 100644 index 00000000000..177f668ea0b --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/bnd.bnd @@ -0,0 +1,35 @@ +#******************************************************************************* +# Copyright (c) 2025 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +#******************************************************************************* +-include= ~../cnf/resources/bnd/bundle.props +bVersion=1.0 + +src: \ + fat/src,\ + test-applications/basic.war/src + +fat.project: true + +tested.features: \ + checkpoint,\ + servlet-5.0,\ + servlet-6.0,\ + servlet-6.1,\ + websocket-2.0,\ + websocket-2.1,\ + websocket-2.2 + + +-buildpath: \ + org.asynchttpclient:async-http-client;version=2.12.3,\ + io.openliberty.io.netty;version=latest,\ + com.ibm.websphere.appserver.api.wsoc;version=latest,\ + com.ibm.websphere.javaee.servlet.4.0;version=latest,\ + com.ibm.ws.wsoc.1.1;version=latest,\ + com.ibm.websphere.javaee.websocket.1.0;version=latest diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/build.gradle b/dev/io.openliberty.checkpoint_fat_wsoc/build.gradle new file mode 100644 index 00000000000..af3ba3dabaf --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/build.gradle @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +dependencies { + requiredLibs "org.asynchttpclient:async-http-client:2.12.3", + "org.asynchttpclient:async-http-client-netty-utils:2.12.3", + "com.typesafe.netty:netty-reactive-streams:2.0.4", + "org.reactivestreams:reactive-streams:1.0.4", + 'junit:junit:4.12', + project(":io.openliberty.io.netty") +} +addRequiredLibraries.dependsOn addJakartaTransformer diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/cognitiveMetadata.yml b/dev/io.openliberty.checkpoint_fat_wsoc/cognitiveMetadata.yml new file mode 100644 index 00000000000..36285657b71 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/cognitiveMetadata.yml @@ -0,0 +1,6 @@ +--- +# YML metadata file made use of by the Cognitive Ecosystem. +# Reference Cognitive Metadata is available at: https://github.com/OpenLiberty/open-liberty/tree/integration/dev/build.example_fat/cognitiveMetadata.yml +# description: Uncomment this field and add a description to give some notes about this bucket. +# triageNotes: Uncomment this field if there are some short notes you would like Pipeline Monitors to see when triaging this bucket. +functionalArea: InstantOn diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/BasicTest.java b/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/BasicTest.java new file mode 100644 index 00000000000..4d95a8e9eeb --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/BasicTest.java @@ -0,0 +1,221 @@ + +/******************************************************************************* + * Copyright (c) 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.checkpoint.fat; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.lang.StringBuilder; +import java.util.Arrays; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +import org.asynchttpclient.Dsl; +import org.asynchttpclient.ws.WebSocket; +import org.asynchttpclient.ws.WebSocketListener; +import org.asynchttpclient.ws.WebSocketUpgradeHandler; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import com.ibm.websphere.simplicity.ShrinkHelper; + +import componenttest.annotation.CheckpointTest; +import componenttest.annotation.Server; +import componenttest.custom.junit.runner.FATRunner; +import componenttest.topology.impl.LibertyServer; +import io.openliberty.checkpoint.spi.CheckpointPhase; + +/** + * Basic WebSockets tests to ensure the behavior works as expected after a checkpoint restore. + */ +@RunWith(FATRunner.class) +@CheckpointTest +public class BasicTest { + + @Server("basicWsocServer") + public static LibertyServer server; + + private static final Logger LOG = Logger.getLogger(BasicTest.class.getName()); + + private static final String APP_NAME = "basic"; + + private static Boolean IS_EXPECTED_RESULT = false; + + private static CountDownLatch latch; // Used to address timing issues between when the message is recived and when the assert is checked + + @BeforeClass + public static void setUp() throws Exception { + + // Build the war app and add the dependencies + ShrinkHelper.defaultDropinApp(server, APP_NAME + ".war", "io.openliberty.wsoc.basic"); + + server.setCheckpoint(CheckpointPhase.AFTER_APP_START, false, + server -> { + assertNotNull("'SRVE0169I: Loading Web Module: " + APP_NAME + "' message not found in log before rerstore", + server.waitForStringInLogUsingMark("SRVE0169I: .*" + APP_NAME, 0)); + assertNotNull("'CWWKZ0001I: Application " + APP_NAME + " started' message not found in log.", + server.waitForStringInLogUsingMark("CWWKZ0001I: .*" + APP_NAME, 0)); + }); + server.startServer(); + server.checkpointRestore(); + } + + @AfterClass + public static void tearDown() throws Exception { + + if (server != null && server.isStarted()) { + server.stopServer(); + } + + } + + @Before + public void resetResult() throws Exception { + IS_EXPECTED_RESULT = false; + latch = null; + } + + private WebSocketUpgradeHandler createWebSocketUpgradeHandler(Object expectedResult) { + + latch = new CountDownLatch(1); // forces the asserts in each test to be checked once the message is recieved (via countdown / await) + + WebSocketUpgradeHandler.Builder upgradeHandlerBuilder = new WebSocketUpgradeHandler.Builder(); + WebSocketUpgradeHandler wsHandler = upgradeHandlerBuilder + .addWebSocketListener(new WebSocketListener() { + @Override + public void onOpen(WebSocket websocket) { + // WebSocket connection opened + LOG.info("Opened Websocket"); + } + + @Override + public void onClose(WebSocket websocket, int code, String reason) { + // WebSocket connection closed + LOG.info("Closed Websocket"); + } + + @Override + public void onError(Throwable t) { + // WebSocket connection error + LOG.info("Session Error Occurred: " + t); + } + + @Override + public void onBinaryFrame(byte[] payload, boolean finalFragment, int rsv) { + // Log message + StringBuilder sb = new StringBuilder(); + for (byte b : payload) { + sb.append((char) b); + } + LOG.info("Debugging binary message: " + sb.toString()); + IS_EXPECTED_RESULT = Arrays.equals(payload, (byte[]) expectedResult); + latch.countDown(); + } + + @Override + public void onTextFrame(String payload, boolean finalFragment, int rsv) { + // Log message + LOG.info("Debugging text message: " + payload); + IS_EXPECTED_RESULT = expectedResult.equals(payload); + latch.countDown(); + } + }) + .build(); + return wsHandler; + } + + /* + * Tested the PathParam annotation + */ + @Test + public void testAnnotatedByteArray() throws Exception { + Object expectedResult = "test message".getBytes(); + + WebSocketUpgradeHandler wsHandler = createWebSocketUpgradeHandler(expectedResult); + + WebSocket webSocketClient = Dsl.asyncHttpClient() + .prepareGet("ws://" + + server.getHostname() + ":" + + server.getHttpDefaultPort() + "/" + + APP_NAME + + "/annotatedByteArray/true") + .setRequestTimeout(5000) + .execute(wsHandler) + .get(); + + if (webSocketClient.isOpen()) { + LOG.info("sending message"); + webSocketClient.sendBinaryFrame("test message".getBytes()); + } + latch.await(3L, TimeUnit.SECONDS); + webSocketClient.sendCloseFrame(); + assertTrue("Results do not match! ", IS_EXPECTED_RESULT); + } + + /* + * Verifies the decoder annotation is picked up + */ + @Test + public void testDecoder() throws Exception { + Object expectedResult = "[class io.openliberty.wsoc.basic.BinaryStreamDecoder]"; + + WebSocketUpgradeHandler wsHandler = createWebSocketUpgradeHandler(expectedResult); + WebSocket webSocketClient = Dsl.asyncHttpClient() + .prepareGet("ws://" + + server.getHostname() + ":" + + server.getHttpDefaultPort() + "/" + + APP_NAME + + "/defaults") + .setRequestTimeout(5000) + .execute(wsHandler) + .get(); + + if (webSocketClient.isOpen()) { + LOG.info("sending message"); + webSocketClient.sendTextFrame("decoders"); + } + latch.await(3L, TimeUnit.SECONDS); + webSocketClient.sendCloseFrame(); + assertTrue("Results do not match! ", IS_EXPECTED_RESULT); + } + + /* + * Verifies the WsWsocServerContainer#doUprade works (deprecated in 2.1) + */ + @Test + public void testUpgrade() throws Exception { + Object expectedResult = "got your message hello world"; + + WebSocketUpgradeHandler wsHandler = createWebSocketUpgradeHandler(expectedResult); + WebSocket webSocketClient = Dsl.asyncHttpClient() + .prepareGet("ws://" + + server.getHostname() + ":" + + server.getHttpDefaultPort() + "/" + + APP_NAME + + "/upgradeEcho") + .setRequestTimeout(5000) + .execute(wsHandler) + .get(); + + if (webSocketClient.isOpen()) { + LOG.info("sending message"); + webSocketClient.sendTextFrame("hello world"); + } + latch.await(3L, TimeUnit.SECONDS); + webSocketClient.sendCloseFrame(); + assertTrue("Results do not match! ", IS_EXPECTED_RESULT); + } + +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/FATSuite.java b/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/FATSuite.java new file mode 100644 index 00000000000..57c6786eb99 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/fat/src/io/openliberty/checkpoint/fat/FATSuite.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.checkpoint.fat; + +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.ibm.ws.fat.util.FatLogHandler; + +import componenttest.custom.junit.runner.AlwaysPassesTest; +import componenttest.rules.repeater.EmptyAction; +import componenttest.rules.repeater.FeatureReplacementAction; +import componenttest.rules.repeater.RepeatTests; + +@RunWith(Suite.class) +@SuiteClasses({ + AlwaysPassesTest.class, + BasicTest.class +}) +public class FATSuite { + + @ClassRule + public static RepeatTests repeat = RepeatTests.with(new EmptyAction().fullFATOnly()) + .andWith(FeatureReplacementAction.EE9_FEATURES().conditionalFullFATOnly(FeatureReplacementAction.GREATER_THAN_OR_EQUAL_JAVA_11)) + .andWith(FeatureReplacementAction.EE10_FEATURES().conditionalFullFATOnly(FeatureReplacementAction.GREATER_THAN_OR_EQUAL_JAVA_17)) + .andWith(FeatureReplacementAction.EE11_FEATURES()); + + @BeforeClass + public static void generateHelpFile() { + FatLogHandler.generateHelpFile(); + } + +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/bootstrap.properties b/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/bootstrap.properties new file mode 100644 index 00000000000..cb1be38a04b --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/bootstrap.properties @@ -0,0 +1,10 @@ +############################################################################### +# Copyright (c) 2025 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### +bootstrap.include=../testports.properties diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/server.xml b/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/server.xml new file mode 100644 index 00000000000..d9b06b90381 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/publish/servers/basicWsocServer/server.xml @@ -0,0 +1,40 @@ + + + + + + + servlet-4.0 + websocket-1.1 + localConnector-1.0 + timedexit-1.0 + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/resources/WEB-INF/web.xml b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/resources/WEB-INF/web.xml new file mode 100644 index 00000000000..7d6505826b1 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/resources/WEB-INF/web.xml @@ -0,0 +1,26 @@ + + + + + basic + + + UpgradeServlet + io.openliberty.wsoc.basic.UpgradeServlet + 1 + + + + UpgradeServlet + /upgradeEcho + + + diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/BinaryStreamDecoder.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/BinaryStreamDecoder.java new file mode 100644 index 00000000000..ee2b53d28c4 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/BinaryStreamDecoder.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2014 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import javax.websocket.DecodeException; +import javax.websocket.Decoder.BinaryStream; +import javax.websocket.EndpointConfig; + +/** + * + */ +public class BinaryStreamDecoder implements BinaryStream { + @Override + public void init(EndpointConfig arg0) { + } + + @Override + public CustomString decode(InputStream instream) throws DecodeException { + BufferedReader buffReader = new BufferedReader(new InputStreamReader(instream)); + String line = null; + try { + line = buffReader.readLine(); + } catch (IOException e) { + e.printStackTrace(); + } + CustomString customString = new CustomString(); + customString.set(line); + return customString; + } + + /* + * (non-Javadoc) + * + * @see javax.websocket.Decoder#destroy() + */ + @Override + public void destroy() { + // Do nothing. + } + +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/ByteArrayTest.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/ByteArrayTest.java new file mode 100644 index 00000000000..cf2e1c5b626 --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/ByteArrayTest.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2013, 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +import javax.websocket.OnMessage; +import javax.websocket.OnOpen; +import javax.websocket.SendHandler; +import javax.websocket.SendResult; +import javax.websocket.Session; + +import javax.websocket.server.ServerEndpoint; + +import javax.websocket.server.PathParam; + +@ServerEndpoint(value = "/annotatedByteArray/{boolean-var}") +public class ByteArrayTest { + + @OnOpen + public void onOpen(final Session session) { + + } + + //test which shows boolean pair, session, @PathParam and actual message. Parameters can be in any order + @OnMessage + public byte[] echoText(boolean last, Session session, @PathParam("boolean-var") boolean booleanVar, byte[] data) { //session, msg and last can be at different param index + if (session != null && last && booleanVar) { + System.out.println("ByteArrayTest#echoText: " + data); + return data; + } else { + return null; + } + } + +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/CustomString.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/CustomString.java new file mode 100644 index 00000000000..bde2fa4c80f --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/CustomString.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2014, 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +public class CustomString { + private String value; + + public String get() { + return value; + } + + public void set(String value) { + this.value = value; + } +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/DefaultsServerEP.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/DefaultsServerEP.java new file mode 100644 index 00000000000..9c9bfa5efea --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/DefaultsServerEP.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +import java.util.Arrays; + +import javax.websocket.OnMessage; +import javax.websocket.server.ServerEndpoint; + +@ServerEndpoint(value = "/defaults", decoders = { BinaryStreamDecoder.class }) +public class DefaultsServerEP { + @OnMessage + public String getDefaults(String input) { + if (input.equals("decoders")) { + return getDecoders(); + } + return input; + } + + private String getDecoders() { + ServerEndpoint serverEP = (ServerEndpoint) getClass().getAnnotations()[0]; + String returnText = Arrays.asList(serverEP.decoders()).toString(); + System.out.println("DefaultsServerEP#getDecoders: " + returnText); + return returnText; + } +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/EchoServerEP.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/EchoServerEP.java new file mode 100644 index 00000000000..eabbafb3dba --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/EchoServerEP.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +import javax.websocket.OnMessage; +import javax.websocket.OnOpen; +import javax.websocket.SendHandler; +import javax.websocket.SendResult; +import javax.websocket.Session; + +import javax.websocket.server.ServerEndpoint; + +/* + * Echos messages sent to this endpoint. + * Used for testing GetResultTestSession + */ +@ServerEndpoint(value = "/echo") +public class EchoServerEP { + + @OnOpen + public void onOpen(final Session session) { + + } + + // asynchronous text message delivery using a callback + + @OnMessage + public void onMsg(String msg, Session session) { + // Print out session ID before the message is sent + System.out.println("EchoServerEP#onMsg: " + msg); + session.getAsyncRemote().sendText("got your message " + msg); + } + +} diff --git a/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/UpgradeServlet.java b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/UpgradeServlet.java new file mode 100644 index 00000000000..07187e07b6d --- /dev/null +++ b/dev/io.openliberty.checkpoint_fat_wsoc/test-applications/basic.war/src/io/openliberty/wsoc/basic/UpgradeServlet.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2025 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package io.openliberty.wsoc.basic; + +import java.io.IOException; +import java.util.HashMap; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.websocket.DeploymentException; +import javax.websocket.server.ServerContainer; +import com.ibm.websphere.wsoc.WsWsocServerContainer; +import javax.websocket.server.ServerEndpointConfig; + +public class UpgradeServlet extends HttpServlet { + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + + ServerContainer container = (ServerContainer) req.getServletContext().getAttribute("javax.websocket.server.ServerContainer"); + + if (container instanceof WsWsocServerContainer) { + WsWsocServerContainer ws = (WsWsocServerContainer) container; + try { + // Upgrade request to websocket to hit the webcontainer and set restrictions. In essence, move out of web application deployment phase + ws.doUpgrade(req, resp, ServerEndpointConfig.Builder.create(EchoServerEP.class, "/echo").build(), new HashMap()); + // Add a new endpoint to test restrictions + // ws.addEndpoint(ServerEndpointConfig.Builder.create(EchoServerEP.class, "/newEchoEndpointAdded").build()); + } catch (Exception ex) { + // Do nothing + } + } + + } + +}