Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 61690 invoked from network); 13 Jun 2007 14:31:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jun 2007 14:31:15 -0000 Received: (qmail 27018 invoked by uid 500); 13 Jun 2007 14:31:19 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 26998 invoked by uid 500); 13 Jun 2007 14:31:19 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 26950 invoked by uid 99); 13 Jun 2007 14:31:18 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2007 07:31:18 -0700 X-ASF-Spam-Status: No, hits=-98.6 required=10.0 tests=ALL_TRUSTED,INFO_TLD,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jun 2007 07:31:13 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 0F51D1A981A; Wed, 13 Jun 2007 07:30:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r546888 - in /felix/sandbox/clement/event.handler: ./ .settings/ bin/ bin/org/ bin/org/apache/ bin/org/apache/felix/ bin/org/apache/felix/ipojo/ bin/org/apache/felix/ipojo/handler/ bin/org/apache/felix/ipojo/handler/event/ docs/ src/ src/ma... Date: Wed, 13 Jun 2007 14:30:52 -0000 To: commits@felix.apache.org From: clement@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070613143053.0F51D1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: clement Date: Wed Jun 13 07:30:50 2007 New Revision: 546888 URL: http://svn.apache.org/viewvc?view=rev&rev=546888 Log: Initial Import of the iPOJO Event Admin Handler Added: felix/sandbox/clement/event.handler/ felix/sandbox/clement/event.handler/.checkstyle felix/sandbox/clement/event.handler/.classpath felix/sandbox/clement/event.handler/.project felix/sandbox/clement/event.handler/.settings/ felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.core.prefs felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.ui.prefs felix/sandbox/clement/event.handler/bin/ felix/sandbox/clement/event.handler/bin/org/ felix/sandbox/clement/event.handler/bin/org/apache/ felix/sandbox/clement/event.handler/bin/org/apache/felix/ felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/ felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/ felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/ felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class (with props) felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class (with props) felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventUtil.class (with props) felix/sandbox/clement/event.handler/docs/ felix/sandbox/clement/event.handler/docs/EventHandler Documentation.doc (with props) felix/sandbox/clement/event.handler/pom.xml felix/sandbox/clement/event.handler/src/ felix/sandbox/clement/event.handler/src/main/ felix/sandbox/clement/event.handler/src/main/java/ felix/sandbox/clement/event.handler/src/main/java/org/ felix/sandbox/clement/event.handler/src/main/java/org/apache/ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.java felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.java felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventUtil.java felix/sandbox/clement/event.handler/src/main/resources/ felix/sandbox/clement/event.handler/target/ felix/sandbox/clement/event.handler/target/classes/ felix/sandbox/clement/event.handler/target/classes/org/ felix/sandbox/clement/event.handler/target/classes/org/apache/ felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/ felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/ felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/ felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class (with props) felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class (with props) felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventUtil.class (with props) felix/sandbox/clement/event.handler/target/org.apache.felix.ipojo.handler.event-0.7.1-SNAPSHOT-incubator.jar (with props) Added: felix/sandbox/clement/event.handler/.checkstyle URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/.checkstyle?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/.checkstyle (added) +++ felix/sandbox/clement/event.handler/.checkstyle Wed Jun 13 07:30:50 2007 @@ -0,0 +1,9 @@ + + + + + + + + + Added: felix/sandbox/clement/event.handler/.classpath URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/.classpath?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/.classpath (added) +++ felix/sandbox/clement/event.handler/.classpath Wed Jun 13 07:30:50 2007 @@ -0,0 +1,11 @@ + + + + + + + + + + + Added: felix/sandbox/clement/event.handler/.project URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/.project?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/.project (added) +++ felix/sandbox/clement/event.handler/.project Wed Jun 13 07:30:50 2007 @@ -0,0 +1,23 @@ + + + event.handler + + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder + + + + + + org.eclipse.jdt.core.javanature + com.atlassw.tools.eclipse.checkstyle.CheckstyleNature + + Added: felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.core.prefs?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.core.prefs (added) +++ felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.core.prefs Wed Jun 13 07:30:50 2007 @@ -0,0 +1,258 @@ +#Wed Jun 13 15:14:28 CEST 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +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=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +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=1 +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_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=true +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +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=insert +org.eclipse.jdt.core.formatter.comment.line_length=200 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=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=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=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=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=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_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.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=120 +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=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false Added: felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.ui.prefs URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.ui.prefs?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.ui.prefs (added) +++ felix/sandbox/clement/event.handler/.settings/org.eclipse.jdt.ui.prefs Wed Jun 13 07:30:50 2007 @@ -0,0 +1,6 @@ +#Wed Jun 13 15:03:12 CEST 2007 +eclipse.preferences.version=1 +formatter_profile=_Test +formatter_settings_version=10 +internal.default.compliance=default +org.eclipse.jdt.ui.text.custom_code_templates= Added: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventUtil.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventUtil.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/bin/org/apache/felix/ipojo/handler/event/EventUtil.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/docs/EventHandler Documentation.doc URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/docs/EventHandler%20Documentation.doc?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/docs/EventHandler Documentation.doc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/pom.xml URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/pom.xml?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/pom.xml (added) +++ felix/sandbox/clement/event.handler/pom.xml Wed Jun 13 07:30:50 2007 @@ -0,0 +1,57 @@ + + + org.apache.felix + felix + 0.9.0-incubator-SNAPSHOT + + 4.0.0 + bundle + Event Admin Handler + org.apache.felix + 0.7.1-SNAPSHOT-incubator + org.apache.felix.ipojo.handler.event + + + + org.apache.felix + org.apache.felix.ipojo + 0.7.1-incubator-SNAPSHOT + provided + + + org.apache.felix + org.apache.felix.ipojo.metadata + 0.7.1-incubator-SNAPSHOT + provided + + + org.apache.felix + org.osgi.core + 0.9.0-incubator-SNAPSHOT + provided + + + org.apache.felix + org.osgi.compendium + 0.9.0-incubator-SNAPSHOT + provided + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + org.apache.felix.ipojo.handler.event + ${pom.name} + + + + + + Added: felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.java URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.java?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.java (added) +++ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.java Wed Jun 13 07:30:50 2007 @@ -0,0 +1,308 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.felix.ipojo.handler.event; + +import java.util.ArrayList; +import java.util.Dictionary; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Properties; + +import org.apache.felix.ipojo.ComponentInstance; +import org.apache.felix.ipojo.Handler; +import org.apache.felix.ipojo.InstanceManager; +import org.apache.felix.ipojo.architecture.PropertyDescription; +import org.apache.felix.ipojo.metadata.Element; +import org.apache.felix.ipojo.parser.ManipulationMetadata; +import org.apache.felix.ipojo.parser.MethodMetadata; +import org.apache.felix.ipojo.util.Callback; +import org.apache.felix.ipojo.util.Logger; +import org.osgi.framework.BundleContext; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceRegistration; +import org.osgi.service.event.Event; +import org.osgi.service.event.EventConstants; +import org.osgi.service.event.EventHandler; + +/** + * Event Subscriber Handler. + * @author Felix Project Team + */ +public class EventAdminSubscriberHandler extends Handler implements EventHandler { + + /** + * Handler Namespace. + */ + public static final String NAMESPACE = "org.apache.felix.ipojo.handler.event.EventAdminSubscriberHandler"; + + /** + * Instance Manager. + */ + private InstanceManager m_manager; + + /** + * List of subscriber. + */ + private ArrayList m_subEvent = new ArrayList(); + + /** + * EventHandler registration. + */ + private ServiceRegistration m_sr = null; + + /** + * Handler validity. + */ + private boolean m_isValid = false; + + + /** + * Constructor. + * @param cm : instance manager + * @param metadata : component type metadata + * @param conf : instance configuration + * @see org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.InstanceManager, org.apache.felix.ipojo.metadata.Element, java.util.Dictionary) + */ + public void configure(InstanceManager cm, Element metadata, Dictionary conf) { + // Store the component manager + m_manager = cm; + ManipulationMetadata mm = new ManipulationMetadata(metadata); + + // Get Metadata subscribers + Element[] subscribers = metadata.getElements("subscriber", NAMESPACE); + if (subscribers.length > 0) { + // then check publishers are well formed and fill the publishers' + // map + for (int i = 0; i < subscribers.length; i++) { + EventAdminSubscriberMetadata eventAdminSubscriberMetadata = new EventAdminSubscriberMetadata(m_manager, + subscribers[i]); + + if (eventAdminSubscriberMetadata.getCallbackStr() != null) { + if (mm.getMethod(eventAdminSubscriberMetadata.getCallbackStr(), new String[] { Event.class + .getName() }) != null) { + MethodMetadata methodMetadata = mm.getMethod(eventAdminSubscriberMetadata.getCallbackStr(), + new String[] { Event.class.getName() }); + Callback cb = new Callback(methodMetadata, cm); + eventAdminSubscriberMetadata.setCallback(cb); + } else { + m_manager.getFactory().getLogger().log( + Logger.WARNING, + " EVENT HANDLER SUBSCRIBERS : malformed subscriber : the method " + + eventAdminSubscriberMetadata.getCallbackStr() + + "(Event myEvent) is not present in the component"); + } + m_subEvent.add(eventAdminSubscriberMetadata); + } else { + m_manager.getFactory().getLogger().log(Logger.WARNING, + " EVENT HANDLER SUBSCRIBERS : malformed subscriber !"); + } + } + m_manager.getFactory().getLogger().log(Logger.INFO, " EVENT HANDLER SUBSCRIBERS : Suscribers detected !"); + } else { + m_manager.getFactory().getLogger().log(Logger.ERROR, + " EVENT HANDLER SUBSCRIBERS : no Suscribers detected !"); + } + + // if well formed publishers or subscribers found + if (!m_subEvent.isEmpty()) { + // register the handler + m_manager.getFactory().getLogger().log(Logger.INFO, " EVENT HANDLER SUBSCRIBERS has been configured !"); + m_manager.register(this); + } else { + return; + } + + // Update the current component description + Dictionary dict = new Properties(); + for (int i = 0; i < m_subEvent.size(); i++) { + EventAdminSubscriberMetadata met = (EventAdminSubscriberMetadata) m_subEvent.get(i); + if (met.getFilter() == null) { + dict.put(met.getCallbackStr(), ""); + } else { + dict.put(met.getCallbackStr(), met.getFilter()); + } + } + m_manager.getComponentDescription().addProperty( + new PropertyDescription("event.topics", Dictionary.class.getName(), dict.toString())); + + // Check if the configuration has a event.topics property and upate the + // topic if needed + if (conf.get("event.topics") != null) { + // Map + Dictionary d = (Dictionary) conf.get("event.topics"); + Enumeration e = d.keys(); + while (e.hasMoreElements()) { + String myName = (String) e.nextElement(); // name + for (int i = 0; i < m_subEvent.size(); i++) { + EventAdminSubscriberMetadata met = (EventAdminSubscriberMetadata) (m_subEvent.get(i)); + if (met.getName().equals(myName)) { + met.setTopics((String) d.get(myName)); + break; + } + } + } + } + // Check if the configuration has a event.filter property and upate the + // filter if needed + if (conf.get("event.filter") != null) { + // Map + Dictionary d = (Dictionary) conf.get("event.filter"); + Enumeration e = d.keys(); + while (e.hasMoreElements()) { + String myName = (String) e.nextElement(); // name + for (int i = 0; i < m_subEvent.size(); i++) { + EventAdminSubscriberMetadata met = (EventAdminSubscriberMetadata) (m_subEvent.get(i)); + if (met.getName().equals(myName)) { + try { + met.setFilter((String) d.get(myName)); + } catch (InvalidSyntaxException e1) { + e1.printStackTrace(); + } + break; + } + } + } + } + } + + /** + * Handler stop method. + * Unregister the ServiceHandler service. + * @see org.apache.felix.ipojo.Handler#stop() + */ + public void stop() { + if (m_sr != null) { + m_sr.unregister(); + m_sr = null; + } + m_isValid = false; + } + + + /** + * Handler start method. + * Expose the EventHandler service. + * @see org.apache.felix.ipojo.Handler#start() + */ + public void start() { + m_manager.getFactory().getLogger().log(Logger.INFO, " EVENT HANDLER SUBSCRIBERS STARTING!!!"); + + if (!m_subEvent.isEmpty() && m_sr == null) { + // build the topic to listen + // Topics is a merge of all required topics by subscribers + String topics = ""; + + // for all subscribers + for (int i = 0; i < m_subEvent.size(); i++) { + EventAdminSubscriberMetadata sub = (EventAdminSubscriberMetadata) m_subEvent.get(i); + String stopics = sub.getTopics(); + // gets its topic + if (topics.length() > 0 && stopics.length() > 0) { + topics += ","; + } + // concat to the main topic + topics += stopics; + } + + // Register the EVENT HANDLER SUBSCRIBERS + BundleContext bc = m_manager.getContext(); + Dictionary d = new Hashtable(); + + // Listen to all topics of all package + // Could probably be more restrictive + d.put(EventConstants.EVENT_TOPIC, topics.split(",")); + m_sr = bc.registerService(EventHandler.class.getName(), this, d); + + m_manager.getFactory().getLogger().log(Logger.INFO, + " EVENT HANDLER SUBSCRIBERS : EventHandler registered object: " + this); + } + m_isValid = true; + } + + /*************************************************************************************************************************************************************************************************** + * Handler lifecycle management + **************************************************************************************************************************************************************************************************/ + + /** + * Handler state change method. + * register or unregister the EventHandler service according to the new state. + * @param state : new state + * @see org.apache.felix.ipojo.Handler#stateChanged(int) + */ + public void stateChanged(int state) { + if (state == ComponentInstance.VALID) { + start(); + return; + } + if (state == ComponentInstance.INVALID) { + stop(); + return; + } + } + + /** + * Handler isValid method. + * The method returns false if an exception occurs when receiving an event. + * @return the handler validity. + * @see org.apache.felix.ipojo.Handler#isValid() + */ + public boolean isValid() { + return m_isValid; + } + + /*************************************************************************************************************************************************************************************************** + * OSGi EventHandler management + **************************************************************************************************************************************************************************************************/ + + /** + * Receive an event. + * The event is dispatch to attached subscribers. + * @param event : the received event. + * @see org.osgi.service.event.EventHandler#handleEvent(org.osgi.service.event.Event) + */ + public void handleEvent(Event event) { + // for each subscribers + for (int i = 0; i < m_subEvent.size(); i++) { + EventAdminSubscriberMetadata eventSubscriberData = (EventAdminSubscriberMetadata) m_subEvent.get(i); + synchronized (this) { + // check if the subscribers topic match + + if (eventSubscriberData.matchingTopic(event.getTopic()) + && event.matches(eventSubscriberData.getFilter()) + && m_manager.getState() == InstanceManager.VALID) { + try { + Callback c = eventSubscriberData.getCallback(); + if (c != null) { + c.call(new Object[] { event }); + } + } catch (Exception e) { + m_manager.getFactory().getLogger().log( + Logger.ERROR, + "EVENT HANDLER SUBSCRIBERS CALLBACK error : " + eventSubscriberData.getCallbackStr() + + " exception :" + e + " Cause : " + e.getCause()); + // stop the component : + m_isValid = false; + m_manager.checkInstanceState(); + } + } + } + } + } + +} Added: felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.java URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.java?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.java (added) +++ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.java Wed Jun 13 07:30:50 2007 @@ -0,0 +1,188 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.felix.ipojo.handler.event; + +import org.apache.felix.ipojo.InstanceManager; +import org.apache.felix.ipojo.metadata.Element; +import org.apache.felix.ipojo.util.Callback; +import org.apache.felix.ipojo.util.Logger; +import org.osgi.framework.Filter; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.service.event.Event; + +/** + * Represent an subscriber. + * @author Felix Project Team + */ +class EventAdminSubscriberMetadata { + + /** + * Name of the callback method. + */ + private String m_callbackStr; + + /** + * Callback method. + */ + private Callback m_callback; + + /** + * Listenned topics. + */ + private String m_topics; + + /** + * String form of the event filter. + */ + private String m_filterStr; + + /** + * Event filter. + */ + private Filter m_filter; + + /** + * Event object. + */ + private Event m_value; + + /** + * The name which acts as an identifier. + */ + private String m_name; + + /** + * Ths Instance Manager. + */ + private InstanceManager m_instanceManager; + + /** + * Constructor. + * @param instanceManager : instance manager. + * @param subscriber : subscriber metadata. + */ + public EventAdminSubscriberMetadata(InstanceManager instanceManager, Element subscriber) { + this.m_callbackStr = null; + this.m_topics = null; + this.m_filterStr = ""; + this.m_filter = null; + this.m_value = null; + this.m_name = null; + this.m_instanceManager = instanceManager; + if (checkValidity(subscriber)) { + try { + if (subscriber.containsAttribute("topics")) { + this.m_topics = subscriber.getAttribute("topics"); + } + this.m_callbackStr = subscriber.getAttribute("callback"); + if (subscriber.containsAttribute("filter")) { + this.m_filterStr = subscriber.getAttribute("filter"); + } else { + this.m_filterStr = "(event.topics=*)"; + } + this.m_filter = instanceManager.getContext().createFilter(this.m_filterStr); + + this.m_name = subscriber.getAttribute("name"); + } catch (InvalidSyntaxException e) { + instanceManager.getFactory().getLogger().log(Logger.WARNING, "===> EVENT handler : " + e.getMessage()); + } + } + + } + + /** + * Does the topic match with the listenned topics ? + * @param topic : topic to test. + * @return true if the given topic is a listenned topic. + */ + public boolean matchingTopic(String topic) { + return EventUtil.matches(topic, m_topics.split(",")); + } + + /** + * Is the subscriber metadata valid ? + * This method check only the existence of a callback and a name attribute. + * @param subscriber : metadata. + * @return true if the metadata is valid. + */ + private boolean checkValidity(Element subscriber) { + return subscriber.containsAttribute("callback") && subscriber.containsAttribute("name"); + } + + /* + * SETTERS AND GETTERS => + */ + + public String getCallbackStr() { + return m_callbackStr; + } + + public Callback getCallback() { + return m_callback; + } + + public void setCallback(Callback c) { + this.m_callback = c; + } + + + public String getFilterStr() { + return m_filterStr; + } + + public String getTopics() { + return m_topics; + } + + public Event getValue() { + return m_value; + } + + public void setValue(Event value) { + this.m_value = value; + } + + public Filter getFilter() { + return m_filter; + } + + public void setTopics(String top) { + m_topics = top; + } + + /** + * Create and set the filter. + * The filter is create from the given argument. + * @param filter : the String form of the LDAP filter. + * @throws InvalidSyntaxException : occurs when the given filter is invalid. + */ + public void setFilter(String filter) throws InvalidSyntaxException { + this.m_filterStr = filter; + this.m_filter = m_instanceManager.getContext().createFilter(this.m_filterStr); + } + + public String getName() { + return m_name; + } + + public void setName(String name) { + this.m_name = name; + } + +} Added: felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventUtil.java URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventUtil.java?view=auto&rev=546888 ============================================================================== --- felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventUtil.java (added) +++ felix/sandbox/clement/event.handler/src/main/java/org/apache/felix/ipojo/handler/event/EventUtil.java Wed Jun 13 07:30:50 2007 @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.felix.ipojo.handler.event; + + +/** + * Utility methods. + * @author Felix Project Team + */ +public class EventUtil { + + /** + * Test that the given topic match with the given topic pattern. + * @param topic : topic to test. + * @param topicPattern : topic pattern + * @return true if it matches. + */ + public static boolean matches(String topic, String topicPattern) { + if (topicPattern.equals("*")) { return true; } + int star; + if ((star = topicPattern.indexOf("*")) > 0) { + return topic.startsWith(topicPattern.substring(0, star - 1)); + } else { + return topic.equals(topicPattern); + } + } + + /** + * Test that the given topic match with the given topic patterns. + * @param topic : topic to test. + * @param topicPatterns : topic patterns + * @return true if it matches. + */ + public static boolean matches(String topic, String[] topicPatterns) { + int n = topicPatterns.length; + for (int i = 0; i < n; i++) { + if (matches(topic, topicPatterns[i])) { + return true; + } + } + return false; + } + +} Added: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberHandler.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventAdminSubscriberMetadata.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventUtil.class URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventUtil.class?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/target/classes/org/apache/felix/ipojo/handler/event/EventUtil.class ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: felix/sandbox/clement/event.handler/target/org.apache.felix.ipojo.handler.event-0.7.1-SNAPSHOT-incubator.jar URL: http://svn.apache.org/viewvc/felix/sandbox/clement/event.handler/target/org.apache.felix.ipojo.handler.event-0.7.1-SNAPSHOT-incubator.jar?view=auto&rev=546888 ============================================================================== Binary file - no diff available. Propchange: felix/sandbox/clement/event.handler/target/org.apache.felix.ipojo.handler.event-0.7.1-SNAPSHOT-incubator.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream