diff --git a/build.gradle b/build.gradle index 4db6abc18..055c5bc93 100644 --- a/build.gradle +++ b/build.gradle @@ -315,7 +315,6 @@ between patch versions. } } - project(':legacy') { description = """\ Smack legacy extensions. @@ -331,7 +330,6 @@ Usually XEPs in the state 'retracted', 'rejected', 'deprecated', } } - project(':debug') { description = """\ Smack GUI debugger. @@ -345,6 +343,22 @@ Inspect the exchanged XMPP stanzas. } } +project(':jingle') { + description = """\ +Smack Jingle API. +Warning: This API is beta, outdated and currenlty unmaintained. +""" + dependencies { + compile project(':core') + compile project(':extensions') + compile 'javax.media:jmf:2.1.1e' + compile files('libs/jspeex-0.9.7-jfcom.jar', 'libs/jstun.jar', 'libs/Speex.jar') + testCompile project(':core').sourceSets.test.runtimeClasspath + // Test dependencies (junit, …) are interfered from the sourceSet.test of the core project + // So there is no need to add them explicitly here again + } +} + (subprojects - project(':core'))*.jar { manifest { attributes('Bundle-SymbolicName': project.group + '-' + appendix, diff --git a/integration-test/org/jivesoftware/smack/ChatTest.java b/core/src/integration-test/java/org/jivesoftware/smack/ChatTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/ChatTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/ChatTest.java diff --git a/integration-test/org/jivesoftware/smack/FloodTest.java b/core/src/integration-test/java/org/jivesoftware/smack/FloodTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/FloodTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/FloodTest.java diff --git a/integration-test/org/jivesoftware/smack/IQTest.java b/core/src/integration-test/java/org/jivesoftware/smack/IQTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/IQTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/IQTest.java diff --git a/integration-test/org/jivesoftware/smack/LoginTest.java b/core/src/integration-test/java/org/jivesoftware/smack/LoginTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/LoginTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/LoginTest.java diff --git a/integration-test/org/jivesoftware/smack/MessageTest.java b/core/src/integration-test/java/org/jivesoftware/smack/MessageTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/MessageTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/MessageTest.java diff --git a/integration-test/org/jivesoftware/smack/PacketReaderTest.java b/core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/PacketReaderTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/PacketReaderTest.java diff --git a/integration-test/org/jivesoftware/smack/PresenceTest.java b/core/src/integration-test/java/org/jivesoftware/smack/PresenceTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/PresenceTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/PresenceTest.java diff --git a/integration-test/org/jivesoftware/smack/PrivacyClient.java b/core/src/integration-test/java/org/jivesoftware/smack/PrivacyClient.java similarity index 100% rename from integration-test/org/jivesoftware/smack/PrivacyClient.java rename to core/src/integration-test/java/org/jivesoftware/smack/PrivacyClient.java diff --git a/integration-test/org/jivesoftware/smack/ReconnectionTest.java b/core/src/integration-test/java/org/jivesoftware/smack/ReconnectionTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/ReconnectionTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/ReconnectionTest.java diff --git a/integration-test/org/jivesoftware/smack/RosterInitializedBeforeConnectTest.java b/core/src/integration-test/java/org/jivesoftware/smack/RosterInitializedBeforeConnectTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/RosterInitializedBeforeConnectTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/RosterInitializedBeforeConnectTest.java diff --git a/integration-test/org/jivesoftware/smack/RosterListenerTest.java b/core/src/integration-test/java/org/jivesoftware/smack/RosterListenerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/RosterListenerTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/RosterListenerTest.java diff --git a/integration-test/org/jivesoftware/smack/RosterSmackTest.java b/core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/RosterSmackTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/RosterSmackTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/AndFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/AndFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/AndFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/AndFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/FromContainsFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/FromContainsFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/FromContainsFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/FromContainsFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/NotFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/NotFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/NotFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/NotFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/OrFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/OrFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/OrFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/OrFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/PacketIDFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/PacketIDFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/PacketIDFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/PacketIDFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/PacketTypeFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/PacketTypeFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/PacketTypeFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/PacketTypeFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/filter/ToContainsFilterTest.java b/core/src/integration-test/java/org/jivesoftware/smack/filter/ToContainsFilterTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/filter/ToContainsFilterTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/filter/ToContainsFilterTest.java diff --git a/integration-test/org/jivesoftware/smack/packet/MockPacket.java b/core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java similarity index 100% rename from integration-test/org/jivesoftware/smack/packet/MockPacket.java rename to core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacket.java diff --git a/integration-test/org/jivesoftware/smack/packet/MockPacketFilter.java b/core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacketFilter.java similarity index 100% rename from integration-test/org/jivesoftware/smack/packet/MockPacketFilter.java rename to core/src/integration-test/java/org/jivesoftware/smack/packet/MockPacketFilter.java diff --git a/integration-test/org/jivesoftware/smack/packet/PrivacyProviderTest.java b/core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/packet/PrivacyProviderTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyProviderTest.java diff --git a/integration-test/org/jivesoftware/smack/packet/PrivacyTest.java b/core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/packet/PrivacyTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/packet/PrivacyTest.java diff --git a/integration-test/org/jivesoftware/smack/test/SmackTestCase.java b/core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java similarity index 100% rename from integration-test/org/jivesoftware/smack/test/SmackTestCase.java rename to core/src/integration-test/java/org/jivesoftware/smack/test/SmackTestCase.java diff --git a/integration-test/org/jivesoftware/smack/util/CacheTest.java b/core/src/integration-test/java/org/jivesoftware/smack/util/CacheTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/util/CacheTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/util/CacheTest.java diff --git a/integration-test/org/jivesoftware/smack/util/ConnectionUtils.java b/core/src/integration-test/java/org/jivesoftware/smack/util/ConnectionUtils.java similarity index 100% rename from integration-test/org/jivesoftware/smack/util/ConnectionUtils.java rename to core/src/integration-test/java/org/jivesoftware/smack/util/ConnectionUtils.java diff --git a/integration-test/org/jivesoftware/smack/util/DNSUtilTest.java b/core/src/integration-test/java/org/jivesoftware/smack/util/DNSUtilTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/util/DNSUtilTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/util/DNSUtilTest.java diff --git a/integration-test/org/jivesoftware/smack/util/XMPPErrorTest.java b/core/src/integration-test/java/org/jivesoftware/smack/util/XMPPErrorTest.java similarity index 100% rename from integration-test/org/jivesoftware/smack/util/XMPPErrorTest.java rename to core/src/integration-test/java/org/jivesoftware/smack/util/XMPPErrorTest.java diff --git a/integration-test/config/test-case.example.xml b/core/src/integration-test/resources/test-case.example.xml similarity index 100% rename from integration-test/config/test-case.example.xml rename to core/src/integration-test/resources/test-case.example.xml diff --git a/integration-test/org/jivesoftware/smackx/CompressionTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/CompressionTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/CompressionTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/CompressionTest.java diff --git a/integration-test/org/jivesoftware/smackx/FileTransferTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/FileTransferTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/FileTransferTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/FileTransferTest.java diff --git a/integration-test/org/jivesoftware/smackx/FormTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/FormTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/FormTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/FormTest.java diff --git a/integration-test/org/jivesoftware/smackx/GroupChatInvitationTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/GroupChatInvitationTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/GroupChatInvitationTest.java diff --git a/integration-test/org/jivesoftware/smackx/LastActivityManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/LastActivityManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/LastActivityManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/LastActivityManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/MessageEventManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/MessageEventManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/MessageEventManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/MessageEventManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/MessageEventTests.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/MessageEventTests.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/MessageEventTests.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/MessageEventTests.java diff --git a/integration-test/org/jivesoftware/smackx/MultipleRecipientManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/MultipleRecipientManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/MultipleRecipientManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/MultipleRecipientManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/OfflineMessageManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/OfflineMessageManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/OfflineMessageManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/OfflineMessageManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/RosterExchangeManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/RosterExchangeManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/RosterExchangeTests.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeTests.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/RosterExchangeTests.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/RosterExchangeTests.java diff --git a/integration-test/org/jivesoftware/smackx/ServiceDiscoveryManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/ServiceDiscoveryManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/ServiceDiscoveryManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/ServiceDiscoveryManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/SharedGroupsTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/SharedGroupsTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/SharedGroupsTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/SharedGroupsTest.java diff --git a/integration-test/org/jivesoftware/smackx/VCardTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/VCardTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/VCardTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/VCardTest.java diff --git a/integration-test/org/jivesoftware/smackx/VersionTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/VersionTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/VersionTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/VersionTest.java diff --git a/integration-test/org/jivesoftware/smackx/XHTMLManagerTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/XHTMLManagerTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLManagerTest.java diff --git a/integration-test/org/jivesoftware/smackx/XHTMLSupportTests.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLSupportTests.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/XHTMLSupportTests.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/XHTMLSupportTests.java diff --git a/integration-test/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamTest.java diff --git a/integration-test/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamTest.java diff --git a/integration-test/org/jivesoftware/smackx/commands/AdHocCommandDiscoTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/commands/AdHocCommandDiscoTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/commands/AdHocCommandDiscoTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/commands/AdHocCommandDiscoTest.java diff --git a/integration-test/org/jivesoftware/smackx/entitycaps/EntityCapsTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/entitycaps/EntityCapsTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/entitycaps/EntityCapsTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/entitycaps/EntityCapsTest.java diff --git a/integration-test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java diff --git a/integration-test/org/jivesoftware/smackx/muc/MultiUserChatTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/muc/MultiUserChatTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java diff --git a/integration-test/org/jivesoftware/smackx/packet/MessageEventTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/packet/MessageEventTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/packet/MessageEventTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/packet/MessageEventTest.java diff --git a/integration-test/org/jivesoftware/smackx/packet/RosterExchangeTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/packet/RosterExchangeTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/packet/RosterExchangeTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/packet/RosterExchangeTest.java diff --git a/integration-test/org/jivesoftware/smackx/packet/XHTMLExtensionTest.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/packet/XHTMLExtensionTest.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/packet/XHTMLExtensionTest.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/packet/XHTMLExtensionTest.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/CarExtension.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/CarExtension.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/CarExtension.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/CarExtension.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/CarExtensionProvider.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/CarExtensionProvider.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/CarExtensionProvider.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/CarExtensionProvider.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/EntityUseCases.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/EntityUseCases.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/EntityUseCases.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/EntityUseCases.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/MultiUserSubscriptionUseCases.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/MultiUserSubscriptionUseCases.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/MultiUserSubscriptionUseCases.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/MultiUserSubscriptionUseCases.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/OwnerUseCases.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/OwnerUseCases.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/OwnerUseCases.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/OwnerUseCases.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/PublisherUseCases.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/PublisherUseCases.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/PublisherUseCases.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/PublisherUseCases.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/SubscriberUseCases.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/SubscriberUseCases.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/SubscriberUseCases.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/SubscriberUseCases.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/TestAPI.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestAPI.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/TestAPI.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestAPI.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/TestEvents.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestEvents.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/TestEvents.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestEvents.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/TestMessageContent.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestMessageContent.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/TestMessageContent.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/TestMessageContent.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/test/PubSubTestCase.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/test/PubSubTestCase.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/test/PubSubTestCase.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/test/PubSubTestCase.java diff --git a/integration-test/org/jivesoftware/smackx/pubsub/test/SingleUserTestCase.java b/extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/test/SingleUserTestCase.java similarity index 100% rename from integration-test/org/jivesoftware/smackx/pubsub/test/SingleUserTestCase.java rename to extensions/src/integration-test/java/org/jivesoftware/smackx/pubsub/test/SingleUserTestCase.java diff --git a/jingle/lib/commons-logging-1.1.jar b/jingle/lib/commons-logging-1.1.jar deleted file mode 100644 index 2ff9bbd90..000000000 Binary files a/jingle/lib/commons-logging-1.1.jar and /dev/null differ diff --git a/jingle/lib/commons-logging-adapters-1.1.jar b/jingle/lib/commons-logging-adapters-1.1.jar deleted file mode 100644 index 6eec9a525..000000000 Binary files a/jingle/lib/commons-logging-adapters-1.1.jar and /dev/null differ diff --git a/jingle/lib/commons-logging-api-1.1.jar b/jingle/lib/commons-logging-api-1.1.jar deleted file mode 100644 index d1abcbb47..000000000 Binary files a/jingle/lib/commons-logging-api-1.1.jar and /dev/null differ diff --git a/jingle/lib/jmf.jar b/jingle/lib/jmf.jar deleted file mode 100644 index 556b508ef..000000000 Binary files a/jingle/lib/jmf.jar and /dev/null differ diff --git a/jingle/lib/junit.jar b/jingle/lib/junit.jar deleted file mode 100644 index 02ac8fb5b..000000000 Binary files a/jingle/lib/junit.jar and /dev/null differ diff --git a/jingle/lib/Speex.jar b/jingle/libs/Speex.jar similarity index 100% rename from jingle/lib/Speex.jar rename to jingle/libs/Speex.jar diff --git a/jingle/lib/jspeex-0.9.7-jfcom.jar b/jingle/libs/jspeex-0.9.7-jfcom.jar similarity index 100% rename from jingle/lib/jspeex-0.9.7-jfcom.jar rename to jingle/libs/jspeex-0.9.7-jfcom.jar diff --git a/jingle/lib/jstun.jar b/jingle/libs/jstun.jar similarity index 100% rename from jingle/lib/jstun.jar rename to jingle/libs/jstun.jar diff --git a/jingle/lib/mac/0JavaSoundStream.fix.mac.jar b/jingle/libs/mac/0JavaSoundStream.fix.mac.jar similarity index 100% rename from jingle/lib/mac/0JavaSoundStream.fix.mac.jar rename to jingle/libs/mac/0JavaSoundStream.fix.mac.jar diff --git a/jingle/lib/mac/0jmf.mac.jar b/jingle/libs/mac/0jmf.mac.jar similarity index 100% rename from jingle/lib/mac/0jmf.mac.jar rename to jingle/libs/mac/0jmf.mac.jar diff --git a/jingle/lib/windows/jmacm.dll b/jingle/libs/windows/jmacm.dll similarity index 100% rename from jingle/lib/windows/jmacm.dll rename to jingle/libs/windows/jmacm.dll diff --git a/jingle/lib/windows/jmam.dll b/jingle/libs/windows/jmam.dll similarity index 100% rename from jingle/lib/windows/jmam.dll rename to jingle/libs/windows/jmam.dll diff --git a/jingle/lib/windows/jmcvid.dll b/jingle/libs/windows/jmcvid.dll similarity index 100% rename from jingle/lib/windows/jmcvid.dll rename to jingle/libs/windows/jmcvid.dll diff --git a/jingle/lib/windows/jmdaud.dll b/jingle/libs/windows/jmdaud.dll similarity index 100% rename from jingle/lib/windows/jmdaud.dll rename to jingle/libs/windows/jmdaud.dll diff --git a/jingle/lib/windows/jmdaudc.dll b/jingle/libs/windows/jmdaudc.dll similarity index 100% rename from jingle/lib/windows/jmdaudc.dll rename to jingle/libs/windows/jmdaudc.dll diff --git a/jingle/lib/windows/jmddraw.dll b/jingle/libs/windows/jmddraw.dll similarity index 100% rename from jingle/lib/windows/jmddraw.dll rename to jingle/libs/windows/jmddraw.dll diff --git a/jingle/lib/windows/jmfjawt.dll b/jingle/libs/windows/jmfjawt.dll similarity index 100% rename from jingle/lib/windows/jmfjawt.dll rename to jingle/libs/windows/jmfjawt.dll diff --git a/jingle/lib/windows/jmg723.dll b/jingle/libs/windows/jmg723.dll similarity index 100% rename from jingle/lib/windows/jmg723.dll rename to jingle/libs/windows/jmg723.dll diff --git a/jingle/lib/windows/jmgdi.dll b/jingle/libs/windows/jmgdi.dll similarity index 100% rename from jingle/lib/windows/jmgdi.dll rename to jingle/libs/windows/jmgdi.dll diff --git a/jingle/lib/windows/jmgsm.dll b/jingle/libs/windows/jmgsm.dll similarity index 100% rename from jingle/lib/windows/jmgsm.dll rename to jingle/libs/windows/jmgsm.dll diff --git a/jingle/lib/windows/jmh263enc.dll b/jingle/libs/windows/jmh263enc.dll similarity index 100% rename from jingle/lib/windows/jmh263enc.dll rename to jingle/libs/windows/jmh263enc.dll diff --git a/jingle/lib/windows/jmjpeg.dll b/jingle/libs/windows/jmjpeg.dll similarity index 100% rename from jingle/lib/windows/jmjpeg.dll rename to jingle/libs/windows/jmjpeg.dll diff --git a/jingle/lib/windows/jmmci.dll b/jingle/libs/windows/jmmci.dll similarity index 100% rename from jingle/lib/windows/jmmci.dll rename to jingle/libs/windows/jmmci.dll diff --git a/jingle/lib/windows/jmmpa.dll b/jingle/libs/windows/jmmpa.dll similarity index 100% rename from jingle/lib/windows/jmmpa.dll rename to jingle/libs/windows/jmmpa.dll diff --git a/jingle/lib/windows/jmmpegv.dll b/jingle/libs/windows/jmmpegv.dll similarity index 100% rename from jingle/lib/windows/jmmpegv.dll rename to jingle/libs/windows/jmmpegv.dll diff --git a/jingle/lib/windows/jmutil.dll b/jingle/libs/windows/jmutil.dll similarity index 100% rename from jingle/lib/windows/jmutil.dll rename to jingle/libs/windows/jmutil.dll diff --git a/jingle/lib/windows/jmvcm.dll b/jingle/libs/windows/jmvcm.dll similarity index 100% rename from jingle/lib/windows/jmvcm.dll rename to jingle/libs/windows/jmvcm.dll diff --git a/jingle/lib/windows/jmvfw.dll b/jingle/libs/windows/jmvfw.dll similarity index 100% rename from jingle/lib/windows/jmvfw.dll rename to jingle/libs/windows/jmvfw.dll diff --git a/jingle/lib/windows/jmvh263.dll b/jingle/libs/windows/jmvh263.dll similarity index 100% rename from jingle/lib/windows/jmvh263.dll rename to jingle/libs/windows/jmvh263.dll diff --git a/jingle/src/test/java/org/jivesoftware/jingle/JingleManagerTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/JingleManagerTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/JingleManagerTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/JingleManagerTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/JingleMediaTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/JingleMediaTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/JingleMediaTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/JingleMediaTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/JingleSessionTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/JingleSessionTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/JingleSessionTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/JingleSessionTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/JingleSupportTests.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/JingleSupportTests.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/JingleSupportTests.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/JingleSupportTests.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/PayloadTypeTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/PayloadTypeTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/PayloadTypeTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/PayloadTypeTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/BasicResolverTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/BasicResolverTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/BasicResolverTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/BasicResolverTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/BridgedResolverTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/BridgedResolverTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/BridgedResolverTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/BridgedResolverTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/LocalhostTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/LocalhostTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/LocalhostTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/LocalhostTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/STUNResolverTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/STUNResolverTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/STUNResolverTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/STUNResolverTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/TransportCandidateTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/TransportCandidateTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/TransportCandidateTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/TransportCandidateTest.java diff --git a/jingle/src/test/java/org/jivesoftware/jingle/nat/TransportResolverTest.java b/jingle/src/integration-test/java/org/jivesoftware/jingle/nat/TransportResolverTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/jingle/nat/TransportResolverTest.java rename to jingle/src/integration-test/java/org/jivesoftware/jingle/nat/TransportResolverTest.java diff --git a/jingle/src/test/java/org/jivesoftware/provider/JingleProviderTest.java b/jingle/src/integration-test/java/org/jivesoftware/provider/JingleProviderTest.java similarity index 100% rename from jingle/src/test/java/org/jivesoftware/provider/JingleProviderTest.java rename to jingle/src/integration-test/java/org/jivesoftware/provider/JingleProviderTest.java diff --git a/jingle/src/test/resources/test-case.xml b/jingle/src/integration-test/resources/test-case.xml similarity index 100% rename from jingle/src/test/resources/test-case.xml rename to jingle/src/integration-test/resources/test-case.xml diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/ContentNegotiator.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/ContentNegotiator.java index 549121ca0..178cc292d 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/ContentNegotiator.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/ContentNegotiator.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleActionEnum.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleActionEnum.java index 3237cb437..674e39763 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleActionEnum.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleActionEnum.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleException.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleException.java index c1cf1e62e..03b8694e9 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleException.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleException.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java index 73232bc57..9ddc88137 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleManager.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.ConnectionCreationListener; import org.jivesoftware.smack.PacketListener; @@ -32,7 +32,7 @@ import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.provider.ProviderManager; import org.jivesoftware.smack.util.StringUtils; -import org.jivesoftware.smackx.ServiceDiscoveryManager; +import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener; import org.jivesoftware.smackx.jingle.listeners.JingleListener; import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener; @@ -42,7 +42,7 @@ import org.jivesoftware.smackx.jingle.media.PayloadType; import org.jivesoftware.smackx.jingle.nat.BasicTransportManager; import org.jivesoftware.smackx.jingle.nat.TransportCandidate; import org.jivesoftware.smackx.jingle.nat.TransportResolver; -import org.jivesoftware.smackx.packet.DiscoverInfo; +import org.jivesoftware.smackx.disco.packet.DiscoverInfo; import org.jivesoftware.smackx.packet.Jingle; import org.jivesoftware.smackx.provider.JingleProvider; @@ -181,7 +181,7 @@ import org.jivesoftware.smackx.provider.JingleProvider; */ public class JingleManager implements JingleSessionListener { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleManager.class); + private static final Logger LOGGER = Logger.getLogger(JingleManager.class.getName()); // non-static @@ -415,7 +415,7 @@ public class JingleManager implements JingleSessionListener { jingleSession.removeListener(this); jingleSessions.remove(jingleSession); jingleSession.close(); - LOGGER.error("Declined:" + reason); + LOGGER.severe("Declined:" + reason); } public void sessionRedirected(String redirection, JingleSession jingleSession) { diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiator.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiator.java index cb2edca36..d205102e7 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiator.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiator.java @@ -18,6 +18,7 @@ package org.jivesoftware.smackx.jingle; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.Connection; import org.jivesoftware.smack.XMPPException; @@ -40,7 +41,7 @@ import org.jivesoftware.smackx.jingle.listeners.JingleListener; */ public abstract class JingleNegotiator { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleNegotiator.class); + private static final Logger LOGGER = Logger.getLogger(JingleNegotiator.class.getName()); //private Connection connection; // The connection associated @@ -79,7 +80,7 @@ public abstract class JingleNegotiator { JingleNegotiatorState stateWas = state; - LOGGER.debug("Negotiator state change: " + stateWas + "->" + stateIs + "(" + this.getClass().getSimpleName() + ")"); + LOGGER.fine("Negotiator state change: " + stateWas + "->" + stateIs + "(" + this.getClass().getSimpleName() + ")"); switch (stateIs) { case PENDING: diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiatorState.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiatorState.java index 98a691fc3..32c559cdd 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiatorState.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleNegotiatorState.java @@ -1,4 +1,6 @@ /** + * + * Copyright 2003-2005 Jive Software. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSession.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSession.java index 5bce4e582..42d97034f 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSession.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSession.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle; import java.util.ArrayList; @@ -20,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; +import java.util.logging.Logger; import org.jivesoftware.smack.ConnectionListener; import org.jivesoftware.smack.PacketListener; @@ -56,7 +58,7 @@ import org.jivesoftware.smackx.packet.JingleError; */ public class JingleSession extends JingleNegotiator implements MediaReceivedListener { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleSession.class); + private static final Logger LOGGER = Logger.getLogger(JingleSession.class.getName()); // static private static final HashMap sessions = new HashMap(); @@ -235,7 +237,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList public void setSessionState(JingleSessionState stateIs) { - LOGGER.debug("Session state change: " + sessionState + "->" + stateIs); + LOGGER.fine("Session state change: " + sessionState + "->" + stateIs); stateIs.enter(); sessionState = stateIs; } @@ -278,7 +280,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList String responseId = null; - LOGGER.debug("Packet: " + iq.toXML()); + LOGGER.fine("Packet: " + iq.toXML()); try { @@ -647,7 +649,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList if (connectionListener != null) { getConnection().removeConnectionListener(connectionListener); - LOGGER.debug("JINGLE SESSION: REMOVE CONNECTION LISTENER"); + LOGGER.fine("JINGLE SESSION: REMOVE CONNECTION LISTENER"); } } @@ -658,7 +660,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList if (packetListener != null) { getConnection().removePacketListener(packetListener); - LOGGER.debug("JINGLE SESSION: REMOVE PACKET LISTENER"); + LOGGER.fine("JINGLE SESSION: REMOVE PACKET LISTENER"); } } @@ -669,7 +671,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList protected void updatePacketListener() { removePacketListener(); - LOGGER.debug("UpdatePacketListener"); + LOGGER.fine("UpdatePacketListener"); packetListener = new PacketListener() { public void processPacket(Packet packet) { @@ -704,21 +706,21 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList String sid = jin.getSid(); if (sid == null || !sid.equals(getSid())) { - LOGGER.debug("Ignored Jingle(SID) " + sid + "|" + getSid() + " :" + iq.toXML()); + LOGGER.fine("Ignored Jingle(SID) " + sid + "|" + getSid() + " :" + iq.toXML()); return false; } String ini = jin.getInitiator(); if (!ini.equals(getInitiator())) { - LOGGER.debug("Ignored Jingle(INI): " + iq.toXML()); + LOGGER.fine("Ignored Jingle(INI): " + iq.toXML()); return false; } } else { // We accept some non-Jingle IQ packets: ERRORs and ACKs if (iq.getType().equals(IQ.Type.SET)) { - LOGGER.debug("Ignored Jingle(TYPE): " + iq.toXML()); + LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML()); return false; } else if (iq.getType().equals(IQ.Type.GET)) { - LOGGER.debug("Ignored Jingle(TYPE): " + iq.toXML()); + LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML()); return false; } } @@ -974,7 +976,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList public void terminate(String reason) throws XMPPException { if (isClosed()) return; - LOGGER.debug("Terminate " + reason); + LOGGER.fine("Terminate " + reason); Jingle jout = new Jingle(JingleActionEnum.SESSION_TERMINATE); jout.setType(IQ.Type.SET); sendPacket(jout); @@ -1003,7 +1005,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList removePacketListener(); removeConnectionListener(); getConnection().removeConnectionListener(connectionListener); - LOGGER.debug("Negotiation Closed: " + getConnection().getUser() + " " + sid); + LOGGER.fine("Negotiation Closed: " + getConnection().getUser() + " " + sid); super.close(); } @@ -1062,7 +1064,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList IQ iqError = createIQ(ID, to, from, IQ.Type.ERROR); iqError.setError(error); - LOGGER.debug("Created Error Packet:" + iqError.toXML()); + LOGGER.fine("Created Error Packet:" + iqError.toXML()); return iqError; } @@ -1093,7 +1095,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList // NO! Let the normal state machinery do all of the sending. // getConnection().sendPacket(perror); - LOGGER.error("Error sent: " + errorPacket.toXML()); + LOGGER.severe("Error sent: " + errorPacket.toXML()); } return errorPacket; } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionRequest.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionRequest.java index a42dd3ae2..bb0aa24fd 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionRequest.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionRequest.java @@ -6,7 +6,7 @@ * 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 + * 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, @@ -16,6 +16,9 @@ */ package org.jivesoftware.smackx.jingle; +import java.util.logging.Level; +import java.util.logging.Logger; + import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.packet.Jingle; @@ -30,7 +33,7 @@ import org.jivesoftware.smackx.packet.Jingle; */ public class JingleSessionRequest { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleSessionRequest.class); + private static final Logger LOGGER = Logger.getLogger(JingleSessionRequest.class.getName()); private final Jingle jingle; // The Jingle packet @@ -130,7 +133,7 @@ public class JingleSessionRequest { session.updatePacketListener(); session.terminate("Declined"); } catch (XMPPException e) { - LOGGER.error("", e); + LOGGER.log(Level.SEVERE, "XMPPexception in reject", e); } } } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionState.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionState.java index bb9445c96..58ebadf89 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionState.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionState.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateActive.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateActive.java index 32fc9f117..1482dcb0e 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateActive.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateActive.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateEnded.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateEnded.java index 4167542a2..2485ef706 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateEnded.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateEnded.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +16,8 @@ */ package org.jivesoftware.smackx.jingle; +import java.util.logging.Logger; + import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smackx.packet.Jingle; import org.jivesoftware.smackx.packet.JingleError; @@ -24,7 +28,7 @@ import org.jivesoftware.smackx.packet.JingleError; */ public class JingleSessionStateEnded extends JingleSessionState { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleSessionStateEnded.class); + private static final Logger LOGGER = Logger.getLogger(JingleSessionStateEnded.class.getName()); private static JingleSessionStateEnded INSTANCE = null; @@ -45,8 +49,8 @@ public class JingleSessionStateEnded extends JingleSessionState { } public void enter() { - LOGGER.debug("Session Ended"); - LOGGER.debug("-------------------------------------------------------------------"); + LOGGER.fine("Session Ended"); + LOGGER.fine("-------------------------------------------------------------------"); } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStatePending.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStatePending.java index f15a9960e..e2cdf1acd 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStatePending.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStatePending.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateUnknown.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateUnknown.java index 01ca1991d..27a49c0de 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateUnknown.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/JingleSessionStateUnknown.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/SmackLogger.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/SmackLogger.java deleted file mode 100644 index 921379ef2..000000000 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/SmackLogger.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * - * Copyright 2003-2007 Jive Software. - * - * Licensed 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.jivesoftware.smackx.jingle; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.apache.commons.logging.Log; - -// -------------------------------------------------------------------------- -/** - * SmackLogger attempts to use Apache commons-logging if it's available. - * - * When you request an instance of SmackLogger we make an attempt to create an instance of org.apache.commons.logging.Log. - * If we are able to make an instance of Log then we dispatch all log requests to commons-logging. - * If we are not able to make an instance of Log then we dispatch all log requests to System.out/err. - * - * @author jeffw - */ -public class SmackLogger { - - private Log commonsLogger; - - // -------------------------------------------------------------------------- - /** - * This static method is the only way to get an instance of a SmackLogger. - * @param classToLog This is the class that wants to log. (This gives commons-logging a means to control log-level by class.) - * @return An instance of a SmackLogger for the class that wants logging. - */ - public static SmackLogger getLogger(Class classToLog) { - return new SmackLogger(classToLog); - } - - // -------------------------------------------------------------------------- - /** - * This is private to make it impossible to instantiate a new SmackLogger outside of the getLogger() static method. - * @param classToLog This is the class that wants to log. (This gives commons-logging a means to control log-level by class.) - */ - public SmackLogger(Class classToLog) { - setupSmackLogger(classToLog); - } - - // -------------------------------------------------------------------------- - /** - * The actual attempt to create an instance of commons-logging Log. - * @param classToLog - * @return - */ - private void setupSmackLogger(Class classToLog) { - try { - Class logFactoryClass = SmackLogger.class.getClassLoader().loadClass("org.apache.commons.logging.LogFactory"); - Method method = logFactoryClass.getMethod("getLog", Class.class); - //Constructor constructor = Log.class.getConstructor(new Class[] { Object.class }); - commonsLogger = (Log) method.invoke(null, classToLog); - - // We don't care to do anything about exceptions. - // If we can't create a commons-logger then just use our simple one. - } catch (ClassNotFoundException e) { - } catch (SecurityException e) { - } catch (NoSuchMethodException e) { - } catch (IllegalArgumentException e) { - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging error(Object msg, Exception exception) - * @param inDebugMsg - */ - public void error(String inErrorMsg, Exception inException) { - if (commonsLogger != null) { - commonsLogger.error(inErrorMsg, inException); - } else { - System.err.println(inErrorMsg); - inException.printStackTrace(System.err); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging error(Object msg) - * @param inDebugMsg - */ - public void error(String inErrorMsg) { - if (commonsLogger != null) { - commonsLogger.error(inErrorMsg); - } else { - System.err.println(inErrorMsg); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging debug(Object msg) - * @param inDebugMsg - */ - public void debug(String inDebugMsg, Exception inException) { - if (commonsLogger != null) { - commonsLogger.debug(inDebugMsg, inException); - } else { - System.out.println(inDebugMsg); - inException.printStackTrace(System.out); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging debug(Object msg) - * @param inDebugMsg - */ - public void debug(String inDebugMsg) { - if (commonsLogger != null) { - commonsLogger.debug(inDebugMsg); - } else { - System.out.println(inDebugMsg); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging warn(Object msg) - * @param inDebugMsg - */ - public void warn(String inDebugMsg, Exception inException) { - if (commonsLogger != null) { - commonsLogger.warn(inDebugMsg, inException); - } else { - System.out.println(inDebugMsg); - inException.printStackTrace(System.out); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging warn(Object msg) - * @param inDebugMsg - */ - public void warn(String inDebugMsg) { - if (commonsLogger != null) { - commonsLogger.warn(inDebugMsg); - } else { - System.out.println(inDebugMsg); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging info(Object msg) - * @param inDebugMsg - */ - public void info(String inDebugMsg, Exception inException) { - if (commonsLogger != null) { - commonsLogger.info(inDebugMsg, inException); - } else { - System.out.println(inDebugMsg); - inException.printStackTrace(System.out); - } - } - - // -------------------------------------------------------------------------- - /** - * Wrapper for commons-logging info(Object msg) - * @param inDebugMsg - */ - public void info(String inDebugMsg) { - if (commonsLogger != null) { - commonsLogger.info(inDebugMsg); - } else { - System.out.println(inDebugMsg); - } - } - -} diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/listeners/CreatedJingleSessionListener.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/listeners/CreatedJingleSessionListener.java index 874b26ed8..5295342cb 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/listeners/CreatedJingleSessionListener.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/listeners/CreatedJingleSessionListener.java @@ -6,7 +6,7 @@ * 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 + * 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, @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.listeners; import org.jivesoftware.smackx.jingle.JingleSession; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/media/MediaNegotiator.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/media/MediaNegotiator.java index 1c130571a..28e45e1a4 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/media/MediaNegotiator.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/media/MediaNegotiator.java @@ -18,6 +18,7 @@ package org.jivesoftware.smackx.jingle.media; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; @@ -27,7 +28,6 @@ import org.jivesoftware.smackx.jingle.JingleException; import org.jivesoftware.smackx.jingle.JingleNegotiator; import org.jivesoftware.smackx.jingle.JingleNegotiatorState; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.listeners.JingleListener; import org.jivesoftware.smackx.jingle.listeners.JingleMediaListener; import org.jivesoftware.smackx.packet.Jingle; @@ -45,7 +45,7 @@ import org.jivesoftware.smackx.packet.JingleError; */ public class MediaNegotiator extends JingleNegotiator { - private static final SmackLogger LOGGER = SmackLogger.getLogger(MediaNegotiator.class); + private static final Logger LOGGER = Logger.getLogger(MediaNegotiator.class.getName()); //private JingleSession session; // The session this negotiation @@ -216,7 +216,7 @@ public class MediaNegotiator extends JingleNegotiator { setNegotiatorState(JingleNegotiatorState.SUCCEEDED); triggerMediaEstablished(getBestCommonAudioPt()); - LOGGER.error("Media choice:" + getBestCommonAudioPt().getName()); + LOGGER.severe("Media choice:" + getBestCommonAudioPt().getName()); response = session.createAck(jingle); } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/JMFInit.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/JMFInit.java index ce0cda3d0..8f6783a9d 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/JMFInit.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/JMFInit.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +20,13 @@ import java.awt.Frame; import java.awt.TextArea; import java.awt.Toolkit; import java.util.Vector; +import java.util.logging.Logger; import javax.media.Format; import javax.media.PlugInManager; import javax.media.Renderer; import javax.media.format.AudioFormat; -import org.jivesoftware.smackx.jingle.SmackLogger; - import com.sun.media.ExclusiveUse; import com.sun.media.util.Registry; @@ -33,7 +34,7 @@ public class JMFInit extends Frame implements Runnable { private static final long serialVersionUID = 6476412003260641680L; - private static final SmackLogger LOGGER = SmackLogger.getLogger(JMFInit.class); + private static final Logger LOGGER = Logger.getLogger(JMFInit.class.getName()); private String tempDir = "/tmp"; @@ -271,7 +272,7 @@ public class JMFInit extends Frame implements Runnable { } private void message(String mesg) { - LOGGER.debug(mesg); + LOGGER.fine(mesg); } private void createGUI() { diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/demo/Demo.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/demo/Demo.java index 9ff807af5..61239a0d6 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/demo/Demo.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/demo/Demo.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java index 5d3913eb4..9f07c7f0d 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioChannel.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. @@ -21,6 +21,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import javax.media.Codec; import javax.media.Controller; @@ -45,7 +46,6 @@ import javax.media.rtp.RTPManager; import javax.media.rtp.SendStream; import javax.media.rtp.SessionAddress; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; /** @@ -68,7 +68,7 @@ import org.jivesoftware.smackx.jingle.media.JingleMediaSession; */ public class AudioChannel { - private static final SmackLogger LOGGER = SmackLogger.getLogger(AudioChannel.class); + private static final Logger LOGGER = Logger.getLogger(AudioChannel.class.getName()); private MediaLocator locator; private String localIpAddress; @@ -249,8 +249,7 @@ public class AudioChannel { } if (chosen != null) { tracks[i].setFormat(chosen); - LOGGER.error("Track " + i + " is set to transmit as:"); - LOGGER.error(" " + chosen); + LOGGER.severe("Track " + i + " is set to transmit as: " + chosen); if (tracks[i].getFormat() instanceof AudioFormat) { int packetRate = 20; @@ -385,7 +384,7 @@ public class AudioChannel { rtpMgrs[i].addTarget(destAddr); - LOGGER.error("Created RTP session at " + localPort + " to: " + remoteIpAddress + " " + port); + LOGGER.severe("Created RTP session at " + localPort + " to: " + remoteIpAddress + " " + port); sendStream = rtpMgrs[i].createSendStream(dataOutput, i); @@ -414,11 +413,11 @@ public class AudioChannel { try { if (active) { sendStream.start(); - LOGGER.debug("START"); + LOGGER.fine("START"); } else { sendStream.stop(); - LOGGER.debug("STOP"); + LOGGER.fine("STOP"); } } catch (IOException e) { diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioFormatUtils.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioFormatUtils.java index 5252c5b92..410006dc9 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioFormatUtils.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioFormatUtils.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioMediaSession.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioMediaSession.java index 5e5733f78..699021876 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioMediaSession.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioMediaSession.java @@ -1,29 +1,28 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.jmf; import java.io.IOException; import java.net.ServerSocket; +import java.util.logging.Logger; import javax.media.MediaLocator; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; import org.jivesoftware.smackx.jingle.media.PayloadType; import org.jivesoftware.smackx.jingle.nat.TransportCandidate; @@ -40,7 +39,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate; */ public class AudioMediaSession extends JingleMediaSession { - private static final SmackLogger LOGGER = SmackLogger.getLogger(AudioMediaSession.class); + private static final Logger LOGGER = Logger.getLogger(AudioMediaSession.class.getName()); private AudioChannel audioChannel; @@ -74,7 +73,7 @@ public class AudioMediaSession extends JingleMediaSession { localPort = getFreePort(); remotePort = this.getLocal().getSymmetric().getPort(); - LOGGER.debug(this.getLocal().getConnection() + " " + ip + ": " + localPort + "->" + remotePort); + LOGGER.fine(this.getLocal().getConnection() + " " + ip + ": " + localPort + "->" + remotePort); } else { diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioReceiver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioReceiver.java index b2138b23d..27568181a 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioReceiver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/AudioReceiver.java @@ -1,22 +1,23 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.jmf; +import java.util.logging.Logger; + import javax.media.ControllerErrorEvent; import javax.media.ControllerEvent; import javax.media.ControllerListener; @@ -36,7 +37,6 @@ import javax.media.rtp.event.RemotePayloadChangeEvent; import javax.media.rtp.event.SessionEvent; import javax.media.rtp.event.StreamMappedEvent; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; /** @@ -47,7 +47,7 @@ import org.jivesoftware.smackx.jingle.media.JingleMediaSession; public class AudioReceiver implements ReceiveStreamListener, SessionListener, ControllerListener { - private static final SmackLogger LOGGER = SmackLogger.getLogger(AudioReceiver.class); + private static final Logger LOGGER = Logger.getLogger(AudioReceiver.class.getName()); boolean dataReceived = false; @@ -65,7 +65,7 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, public synchronized void update(SessionEvent evt) { if (evt instanceof NewParticipantEvent) { Participant p = ((NewParticipantEvent) evt).getParticipant(); - LOGGER.error(" - A new participant had just joined: " + p.getCNAME()); + LOGGER.fine(" - A new participant had just joined: " + p.getCNAME()); } } @@ -78,8 +78,8 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, ReceiveStream stream = evt.getReceiveStream(); // could be null. if (evt instanceof RemotePayloadChangeEvent) { - LOGGER.error(" - Received an RTP PayloadChangeEvent."); - LOGGER.error("Sorry, cannot handle payload change."); + LOGGER.severe(" - Received an RTP PayloadChangeEvent."); + LOGGER.severe("Sorry, cannot handle payload change."); } else if (evt instanceof NewReceiveStreamEvent) { @@ -91,15 +91,15 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, // Find out the formats. RTPControl ctl = (RTPControl) ds.getControl("javax.jmf.rtp.RTPControl"); if (ctl != null) { - LOGGER.error(" - Recevied new RTP stream: " + ctl.getFormat()); + LOGGER.severe(" - Recevied new RTP stream: " + ctl.getFormat()); } else - LOGGER.error(" - Recevied new RTP stream"); + LOGGER.severe(" - Recevied new RTP stream"); if (participant == null) - LOGGER.error(" The sender of this stream had yet to be identified."); + LOGGER.severe(" The sender of this stream had yet to be identified."); else { - LOGGER.error(" The stream comes from: " + participant.getCNAME()); + LOGGER.severe(" The stream comes from: " + participant.getCNAME()); } // create a player by passing datasource to the Media Manager @@ -119,7 +119,7 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, } catch (Exception e) { - LOGGER.error("NewReceiveStreamEvent exception " + e.getMessage()); + LOGGER.severe("NewReceiveStreamEvent exception " + e.getMessage()); return; } @@ -130,15 +130,15 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, DataSource ds = stream.getDataSource(); // Find out the formats. RTPControl ctl = (RTPControl) ds.getControl("javax.jmf.rtp.RTPControl"); - LOGGER.error(" - The previously unidentified stream "); + LOGGER.severe(" - The previously unidentified stream "); if (ctl != null) - LOGGER.error(" " + ctl.getFormat()); - LOGGER.error(" had now been identified as sent by: " + participant.getCNAME()); + LOGGER.severe(" " + ctl.getFormat()); + LOGGER.severe(" had now been identified as sent by: " + participant.getCNAME()); } } else if (evt instanceof ByeEvent) { - LOGGER.error(" - Got \"bye\" from: " + participant.getCNAME()); + LOGGER.severe(" - Got \"bye\" from: " + participant.getCNAME()); } @@ -161,7 +161,7 @@ public class AudioReceiver implements ReceiveStreamListener, SessionListener, if (ce instanceof ControllerErrorEvent) { p.removeControllerListener(this); - LOGGER.error("Receiver internal error: " + ce); + LOGGER.severe("Receiver internal error: " + ce); } } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/JmfMediaManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/JmfMediaManager.java index a8a2ad2b4..75220421e 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/JmfMediaManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jmf/JmfMediaManager.java @@ -1,29 +1,28 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.jmf; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaManager; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; import org.jivesoftware.smackx.jingle.media.PayloadType; @@ -40,7 +39,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate; */ public class JmfMediaManager extends JingleMediaManager { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JmfMediaManager.class); + private static final Logger LOGGER = Logger.getLogger(JmfMediaManager.class.getName()); public static final String MEDIA_NAME = "JMF"; @@ -142,7 +141,7 @@ public class JmfMediaManager extends JingleMediaManager { jmfProperties.createNewFile(); } catch (IOException ex) { - LOGGER.debug("Failed to create jmf.properties"); + LOGGER.fine("Failed to create jmf.properties"); ex.printStackTrace(); } } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/AudioMediaSession.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/AudioMediaSession.java index a2086d953..f261a2719 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/AudioMediaSession.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/AudioMediaSession.java @@ -1,20 +1,19 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.jspeex; import java.io.IOException; @@ -22,6 +21,7 @@ import java.net.DatagramSocket; import java.net.InetAddress; import java.net.ServerSocket; import java.security.GeneralSecurityException; +import java.util.logging.Logger; import javax.media.NoProcessorException; import javax.media.format.UnsupportedFormatException; @@ -34,7 +34,6 @@ import mil.jfcom.cie.media.session.StreamPlayer; import mil.jfcom.cie.media.srtp.packetizer.SpeexFormat; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; import org.jivesoftware.smackx.jingle.media.PayloadType; import org.jivesoftware.smackx.jingle.nat.TransportCandidate; @@ -52,7 +51,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate; public class AudioMediaSession extends JingleMediaSession implements MediaSessionListener { - private static final SmackLogger LOGGER = SmackLogger.getLogger(AudioMediaSession.class); + private static final Logger LOGGER = Logger.getLogger(AudioMediaSession.class.getName()); private MediaSession mediaSession; @@ -125,7 +124,7 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio localPort = getFreePort(); remotePort = this.getLocal().getSymmetric().getPort(); - LOGGER.debug(this.getLocal().getConnection() + " " + ip + ": " + localPort + "->" + remotePort); + LOGGER.fine(this.getLocal().getConnection() + " " + ip + ": " + localPort + "->" + remotePort); } else { @@ -157,7 +156,7 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio */ public void startTrasmit() { try { - LOGGER.debug("start"); + LOGGER.fine("start"); mediaSession.start(true); this.mediaReceived(""); } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/SpeexMediaManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/SpeexMediaManager.java index 2ee6a851a..936846415 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/SpeexMediaManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/jspeex/SpeexMediaManager.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. @@ -20,9 +20,9 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaManager; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; import org.jivesoftware.smackx.jingle.media.PayloadType; @@ -39,7 +39,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate; */ public class SpeexMediaManager extends JingleMediaManager { - private static final SmackLogger LOGGER = SmackLogger.getLogger(SpeexMediaManager.class); + private static final Logger LOGGER = Logger.getLogger(SpeexMediaManager.class.getName()); public static final String MEDIA_NAME = "Speex"; @@ -106,7 +106,7 @@ public class SpeexMediaManager extends JingleMediaManager { jmfProperties.createNewFile(); } catch (IOException ex) { - LOGGER.debug("Failed to create jmf.properties"); + LOGGER.fine("Failed to create jmf.properties"); ex.printStackTrace(); } } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/multi/MultiMediaManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/multi/MultiMediaManager.java index 4f2057c6f..8a2136d53 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/multi/MultiMediaManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/multi/MultiMediaManager.java @@ -1,20 +1,19 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.multi; import org.jivesoftware.smackx.jingle.JingleSession; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareMediaManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareMediaManager.java index f4dd8b0d4..fc042e5df 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareMediaManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareMediaManager.java @@ -1,20 +1,19 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.sshare; import org.jivesoftware.smackx.jingle.JingleSession; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareSession.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareSession.java index e1a82c902..0fffee829 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareSession.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/ScreenShareSession.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. @@ -24,12 +24,12 @@ import java.net.DatagramSocket; import java.net.InetAddress; import java.net.ServerSocket; import java.net.UnknownHostException; +import java.util.logging.Logger; import javax.swing.JFrame; import javax.swing.JPanel; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.JingleMediaSession; import org.jivesoftware.smackx.jingle.media.PayloadType; import org.jivesoftware.smackx.jingle.mediaimpl.sshare.api.ImageDecoder; @@ -49,7 +49,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportCandidate; */ public class ScreenShareSession extends JingleMediaSession { - private static final SmackLogger LOGGER = SmackLogger.getLogger(ScreenShareSession.class); + private static final Logger LOGGER = Logger.getLogger(ScreenShareSession.class.getName()); private ImageTransmitter transmitter = null; private ImageReceiver receiver = null; @@ -104,7 +104,7 @@ public class ScreenShareSession extends JingleMediaSession { try { receiver = new ImageReceiver(InetAddress.getByName("0.0.0.0"), getRemote().getPort(), getLocal().getPort(), width, height); - LOGGER.debug("Receiving on:" + receiver.getLocalPort()); + LOGGER.fine("Receiving on:" + receiver.getLocalPort()); } catch (UnknownHostException e) { e.printStackTrace(); } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/AbstractBufferedImageOp.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/AbstractBufferedImageOp.java index 9b5c49fe7..17e5a403a 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/AbstractBufferedImageOp.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/AbstractBufferedImageOp.java @@ -1,19 +1,19 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; import java.awt.*; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultDecoder.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultDecoder.java index 085ead65d..5c32ee48a 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultDecoder.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultDecoder.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultEncoder.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultEncoder.java index 3261a8d94..1e78aa646 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultEncoder.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/DefaultEncoder.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageDecoder.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageDecoder.java index 687eebf27..5695e8014 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageDecoder.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageDecoder.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageEncoder.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageEncoder.java index b1ee50306..f0ffa5d18 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageEncoder.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageEncoder.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageReceiver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageReceiver.java index 3e0a741d8..083d94d0b 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageReceiver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageReceiver.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageTransmitter.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageTransmitter.java index 7a9cb4546..36a29a91d 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageTransmitter.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/ImageTransmitter.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +27,7 @@ import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.util.Arrays; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Logger; /** * UDP Image Receiver. @@ -36,7 +37,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public class ImageTransmitter implements Runnable { - private static final SmackLogger LOGGER = SmackLogger.getLogger(ImageTransmitter.class); + private static final Logger LOGGER = Logger.getLogger(ImageTransmitter.class.getName()); private Robot robot; private InetAddress localHost; @@ -100,7 +101,7 @@ public class ImageTransmitter implements Runnable { if (++keyframe > KEYFRAME) { keyframe = 0; } - LOGGER.debug("KEYFRAME:" + keyframe); + LOGGER.fine("KEYFRAME:" + keyframe); for (int i = 0; i < maxI; i++) { for (int j = 0; j < maxJ; j++) { @@ -130,7 +131,7 @@ public class ImageTransmitter implements Runnable { byte[] bytesOut = baos.toByteArray(); if (bytesOut.length > 1000) - LOGGER.error("Bytes out > 1000. Equals " + bytesOut.length); + LOGGER.severe("Bytes out > 1000. Equals " + bytesOut.length); p.setData(bytesOut); p.setAddress(remoteHost); @@ -162,7 +163,7 @@ public class ImageTransmitter implements Runnable { } trace = (System.currentTimeMillis() - trace); - LOGGER.debug("Loop Time:" + trace); + LOGGER.fine("Loop Time:" + trace); if (trace < 500) { try { diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/OctTreeQuantizer.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/OctTreeQuantizer.java index f92eda853..3059aa656 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/OctTreeQuantizer.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/OctTreeQuantizer.java @@ -1,25 +1,24 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; import java.io.PrintStream; import java.util.Vector; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Logger; /** * An image Quantizer based on the Octree algorithm. This is a very basic implementation @@ -28,7 +27,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public class OctTreeQuantizer implements Quantizer { - private static final SmackLogger LOGGER = SmackLogger.getLogger(OctTreeQuantizer.class); + private static final Logger LOGGER = Logger.getLogger(OctTreeQuantizer.class.getName()); /** * The greatest depth the tree is allowed to reach @@ -58,9 +57,9 @@ public class OctTreeQuantizer implements Quantizer { for (int i = 0; i < level; i++) indentStr += " "; if (count == 0) - LOGGER.debug(indentStr + index + ": count=" + count); + LOGGER.fine(indentStr + index + ": count=" + count); else - LOGGER.debug(indentStr + index + ": count=" + count + " red=" + (totalRed/count) + " green=" + (totalGreen / count) + " blue=" + (totalBlue / count)); + LOGGER.fine(indentStr + index + ": count=" + count + " red=" + (totalRed/count) + " green=" + (totalGreen / count) + " blue=" + (totalBlue / count)); for (int i = 0; i < 8; i++) if (leaf[i] != null) leaf[i].list(s, level+2); @@ -138,7 +137,7 @@ public class OctTreeQuantizer implements Quantizer { else node = child; } - LOGGER.debug("getIndexForColor failed"); + LOGGER.fine("getIndexForColor failed"); return 0; } @@ -149,7 +148,7 @@ public class OctTreeQuantizer implements Quantizer { OctTreeNode node = root; -// LOGGER.debug("insertColor="+Integer.toHexString(rgb)); +// LOGGER.fine("insertColor="+Integer.toHexString(rgb)); for (int level = 0; level <= MAX_LEVEL; level++) { OctTreeNode child; int bit = 0x80 >> level; @@ -195,7 +194,7 @@ public class OctTreeQuantizer implements Quantizer { } else node = child; } - LOGGER.debug("insertColor failed"); + LOGGER.fine("insertColor failed"); } private void reduceTree(int numColors) { @@ -209,7 +208,7 @@ public class OctTreeQuantizer implements Quantizer { OctTreeNode child = node.leaf[i]; if (child != null) { if (!child.isLeaf) - LOGGER.debug("not a leaf!"); + LOGGER.fine("not a leaf!"); node.count += child.count; node.totalRed += child.totalRed; node.totalGreen += child.totalGreen; @@ -230,7 +229,7 @@ public class OctTreeQuantizer implements Quantizer { } } - LOGGER.debug("Unable to reduce the OctTree"); + LOGGER.fine("Unable to reduce the OctTree"); } /** diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/PixelUtils.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/PixelUtils.java index 73ffed4f3..236f9710c 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/PixelUtils.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/PixelUtils.java @@ -1,19 +1,19 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; import java.awt.*; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/QuantizeFilter.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/QuantizeFilter.java index 61de3ea4f..c1c1ee8b1 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/QuantizeFilter.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/QuantizeFilter.java @@ -1,19 +1,19 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; import java.awt.*; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/Quantizer.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/Quantizer.java index dd5745dfa..548322a60 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/Quantizer.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/Quantizer.java @@ -1,19 +1,19 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; /** diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/WholeImageFilter.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/WholeImageFilter.java index ec5dc33e0..fe78263ca 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/WholeImageFilter.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/sshare/api/WholeImageFilter.java @@ -1,19 +1,19 @@ -/* -Copyright 2006 Jerry Huxtable - -Licensed 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. -*/ - +/** + * + * Copyright 2006 Jerry Huxtable + * + * Licensed 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.jivesoftware.smackx.jingle.mediaimpl.sshare.api; import java.awt.*; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaManager.java index 9f0b95d7d..3d640644c 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaManager.java @@ -1,20 +1,19 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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.jivesoftware.smackx.jingle.mediaimpl.test; import org.jivesoftware.smackx.jingle.media.JingleMediaManager; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaSession.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaSession.java index b24b4b90e..7c1286da6 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaSession.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/mediaimpl/test/TestMediaSession.java @@ -1,13 +1,13 @@ /** - *

+ * * Copyright 2003-2006 Jive Software. - *

+ * * Licensed 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 - *

+ * + * 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. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicResolver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicResolver.java index 1445e7896..076b3b29b 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicResolver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicResolver.java @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.nat; import org.jivesoftware.smack.XMPPException; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicTransportManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicTransportManager.java index ee7fd20f5..b11471536 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicTransportManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BasicTransportManager.java @@ -1,7 +1,3 @@ -package org.jivesoftware.smackx.jingle.nat; - -import org.jivesoftware.smackx.jingle.JingleSession; - /** * * Copyright 2003-2006 Jive Software. @@ -10,7 +6,7 @@ import org.jivesoftware.smackx.jingle.JingleSession; * 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 + * 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, @@ -18,6 +14,9 @@ import org.jivesoftware.smackx.jingle.JingleSession; * See the License for the specific language governing permissions and * limitations under the License. */ +package org.jivesoftware.smackx.jingle.nat; + +import org.jivesoftware.smackx.jingle.JingleSession; /** * A Basic Jingle Transport Manager implementation. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BridgedTransportManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BridgedTransportManager.java index ffa5a6327..f273a3a16 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BridgedTransportManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/BridgedTransportManager.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/DatagramListener.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/DatagramListener.java index 0908b84b5..f2dbdabf3 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/DatagramListener.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/DatagramListener.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedResolver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedResolver.java index 8a71335c2..c69c04bac 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedResolver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedResolver.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedTransportManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedTransportManager.java index 64fa19360..4f4226a29 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedTransportManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/FixedTransportManager.java @@ -1,12 +1,3 @@ -package org.jivesoftware.smackx.jingle.nat; - -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smackx.jingle.ContentNegotiator; -import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener; -import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener; -import org.jivesoftware.smackx.jingle.media.PayloadType; - /** * * Copyright 2003-2006 Jive Software. @@ -15,7 +6,7 @@ import org.jivesoftware.smackx.jingle.media.PayloadType; * 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 + * 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, @@ -23,6 +14,13 @@ import org.jivesoftware.smackx.jingle.media.PayloadType; * See the License for the specific language governing permissions and * limitations under the License. */ +package org.jivesoftware.smackx.jingle.nat; + +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.jingle.JingleSession; +import org.jivesoftware.smackx.jingle.listeners.CreatedJingleSessionListener; +import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener; +import org.jivesoftware.smackx.jingle.media.PayloadType; /** * A Fixed Jingle Transport Manager implementation. diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/HttpServer.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/HttpServer.java index 1ab013822..de6cf3b11 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/HttpServer.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/HttpServer.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.nat; import java.io.BufferedReader; @@ -23,15 +24,15 @@ import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.StringTokenizer; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Level; +import java.util.logging.Logger; /** * A very Simple HTTP Server */ public class HttpServer { - private static final SmackLogger LOGGER = SmackLogger.getLogger(HttpServer.class); + private static final Logger LOGGER = Logger.getLogger(HttpServer.class.getName()); public HttpServer(int port) { ServerSocket server_socket; @@ -39,12 +40,12 @@ public class HttpServer { try { server_socket = new ServerSocket(port); - LOGGER.debug("httpServer running on port " + + LOGGER.fine("httpServer running on port " + server_socket.getLocalPort()); while (true) { Socket socket = server_socket.accept(); - LOGGER.debug("New connection accepted " + + LOGGER.fine("New connection accepted " + socket.getInetAddress() + ":" + socket.getPort()); @@ -57,13 +58,13 @@ public class HttpServer { thread.start(); } catch (Exception e) { - LOGGER.debug("", e); + LOGGER.log(Level.FINE, "Exception", e); } } } catch (IOException e) { - LOGGER.debug("", e); + LOGGER.log(Level.FINE, "Exception", e); } } @@ -100,7 +101,7 @@ public class HttpServer { while (true) { String headerLine = br.readLine(); - LOGGER.debug(headerLine); + LOGGER.fine(headerLine); if (headerLine.equals(CRLF) || headerLine.equals("")) break; StringTokenizer s = new StringTokenizer(headerLine); diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/ICECandidate.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/ICECandidate.java index 6e6a74137..24eac0c89 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/ICECandidate.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/ICECandidate.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +19,7 @@ package org.jivesoftware.smackx.jingle.nat; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.List; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Logger; /** * ICE Transport candidate. @@ -30,7 +31,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public class ICECandidate extends TransportCandidate implements Comparable { - private static final SmackLogger LOGGER = SmackLogger.getLogger(ICECandidate.class); + private static final Logger LOGGER = Logger.getLogger(ICECandidate.class.getName()); private String id; // An identification @@ -240,7 +241,7 @@ public class ICECandidate extends TransportCandidate implements Comparable - * Copyright 2003-2006 Jive Software. - *

- * Licensed 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. - */ public class ICETransportManager extends JingleTransportManager implements JingleSessionListener, CreatedJingleSessionListener { ICEResolver iceResolver = null; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/JingleTransportManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/JingleTransportManager.java index fce5fa502..d9132306f 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/JingleTransportManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/JingleTransportManager.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/RTPBridge.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/RTPBridge.java index 6b0003312..7aa9274be 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/RTPBridge.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/RTPBridge.java @@ -22,18 +22,17 @@ import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration; import java.util.Iterator; +import java.util.logging.Logger; import org.jivesoftware.smack.PacketCollector; -import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.Connection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.filter.PacketIDFilter; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.ProviderManager; -import org.jivesoftware.smackx.ServiceDiscoveryManager; -import org.jivesoftware.smackx.jingle.SmackLogger; -import org.jivesoftware.smackx.packet.DiscoverInfo; +import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; +import org.jivesoftware.smackx.disco.packet.DiscoverInfo; import org.xmlpull.v1.XmlPullParser; /** @@ -49,7 +48,7 @@ import org.xmlpull.v1.XmlPullParser; */ public class RTPBridge extends IQ { - private static final SmackLogger LOGGER = SmackLogger.getLogger(RTPBridge.class); + private static final Logger LOGGER = Logger.getLogger(RTPBridge.class.getName()); private String sid; private String pass; @@ -403,8 +402,7 @@ public class RTPBridge extends IQ { connection.sendPacket(rtpPacket); - RTPBridge response = (RTPBridge) collector - .nextResult(SmackConfiguration.getPacketReplyTimeout()); + RTPBridge response = (RTPBridge) collector.nextResult(); // Cancel the collector. collector.cancel(); @@ -424,7 +422,7 @@ public class RTPBridge extends IQ { return false; } - LOGGER.debug("Service listing"); + LOGGER.fine("Service listing"); ServiceDiscoveryManager disco = ServiceDiscoveryManager .getInstanceFor(connection); @@ -483,8 +481,7 @@ public class RTPBridge extends IQ { connection.sendPacket(rtpPacket); - RTPBridge response = (RTPBridge) collector - .nextResult(SmackConfiguration.getPacketReplyTimeout()); + RTPBridge response = (RTPBridge) collector.nextResult(); // Cancel the collector. collector.cancel(); @@ -515,8 +512,7 @@ public class RTPBridge extends IQ { xmppConnection.sendPacket(rtpPacket); - RTPBridge response = (RTPBridge) collector - .nextResult(SmackConfiguration.getPacketReplyTimeout()); + RTPBridge response = (RTPBridge) collector.nextResult(); // Cancel the collector. collector.cancel(); diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUN.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUN.java index 806818532..70f7b71dc 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUN.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUN.java @@ -6,7 +6,7 @@ * 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 + * 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, @@ -19,19 +19,18 @@ package org.jivesoftware.smackx.jingle.nat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.PacketCollector; -import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.Connection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.filter.PacketIDFilter; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.ProviderManager; -import org.jivesoftware.smackx.ServiceDiscoveryManager; -import org.jivesoftware.smackx.jingle.SmackLogger; -import org.jivesoftware.smackx.packet.DiscoverInfo; -import org.jivesoftware.smackx.packet.DiscoverItems; +import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; +import org.jivesoftware.smackx.disco.packet.DiscoverInfo; +import org.jivesoftware.smackx.disco.packet.DiscoverItems; import org.xmlpull.v1.XmlPullParser; /** @@ -45,7 +44,7 @@ import org.xmlpull.v1.XmlPullParser; */ public class STUN extends IQ { - private static final SmackLogger LOGGER = SmackLogger.getLogger(STUN.class); + private static final Logger LOGGER = Logger.getLogger(STUN.class.getName()); private List servers = new ArrayList(); @@ -199,8 +198,7 @@ public class STUN extends IQ { connection.sendPacket(stunPacket); - STUN response = (STUN) collector - .nextResult(SmackConfiguration.getPacketReplyTimeout()); + STUN response = (STUN) collector.nextResult(); // Cancel the collector. collector.cancel(); @@ -220,7 +218,7 @@ public class STUN extends IQ { return false; } - LOGGER.debug("Service listing"); + LOGGER.fine("Service listing"); ServiceDiscoveryManager disco = ServiceDiscoveryManager .getInstanceFor(connection); @@ -240,7 +238,7 @@ public class STUN extends IQ { return true; } - LOGGER.debug(item.getName()+"-"+info.getType()); + LOGGER.fine(item.getName()+"-"+info.getType()); } } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNResolver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNResolver.java index c9de553cc..85ebfb69c 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNResolver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNResolver.java @@ -6,7 +6,7 @@ * 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 + * 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, @@ -23,10 +23,11 @@ import java.net.SocketException; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; +import java.util.logging.Level; +import java.util.logging.Logger; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.xmlpull.mxp1.MXParser; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -44,7 +45,7 @@ import de.javawi.jstun.test.DiscoveryTest; */ public class STUNResolver extends TransportResolver { - private static final SmackLogger LOGGER = SmackLogger.getLogger(STUNResolver.class); + private static final Logger LOGGER = Logger.getLogger(STUNResolver.class.getName()); // The filename where the STUN servers are stored. public final static String STUNSERVERS_FILENAME = "META-INF/stun-config.xml"; @@ -181,10 +182,10 @@ public class STUNResolver extends TransportResolver { } catch (XmlPullParserException e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception", e); } catch (IOException e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception", e); } currentServer = bestSTUNServer(serversList); @@ -239,7 +240,7 @@ public class STUNResolver extends TransportResolver { } } catch (Exception e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception", e); } return serversList; @@ -272,7 +273,7 @@ public class STUNResolver extends TransportResolver { resolvedPublicIP, getFreePort()); candidate.setLocalIp(resolvedLocalIP); - LOGGER.debug("RESOLVING : " + resolvedPublicIP + ":" + candidate.getPort()); + LOGGER.fine("RESOLVING : " + resolvedPublicIP + ":" + candidate.getPort()); addCandidate(candidate); @@ -286,7 +287,7 @@ public class STUNResolver extends TransportResolver { * @throws XMPPException */ public void initialize() throws XMPPException { - LOGGER.debug("Initialized"); + LOGGER.fine("Initialized"); if (!isResolving()&&!isResolved()) { // Get the best STUN server available if (currentServer.isNull()) { @@ -354,14 +355,14 @@ public class STUNResolver extends TransportResolver { } } catch (Exception e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception", e); } } } } } catch (SocketException e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception", e); } finally { setInitialized(); @@ -508,7 +509,7 @@ public class STUNResolver extends TransportResolver { } } catch (Exception e) { - LOGGER.error(e.getMessage(), e); + LOGGER.log(Level.SEVERE, "Exception in checkBinding", e); } return result; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNTransportManager.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNTransportManager.java index 8b9b39053..4b902b911 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNTransportManager.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/STUNTransportManager.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeClient.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeClient.java index 445cdcba6..20891ec75 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeClient.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeClient.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +23,7 @@ import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.Socket; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Logger; /** * A Simple and Experimental Bridge. @@ -31,7 +32,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public class TcpUdpBridgeClient { - private static final SmackLogger LOGGER = SmackLogger.getLogger(TcpUdpBridgeClient.class); + private static final Logger LOGGER = Logger.getLogger(TcpUdpBridgeClient.class.getName()); private String remoteTcpHost = null; private String remoteUdpHost = null; @@ -52,7 +53,7 @@ public class TcpUdpBridgeClient { localTcpSocket = new Socket(remoteTcpHost, remoteTcpPort); localUdpSocket = new DatagramSocket(0); localUdpPort = localUdpSocket.getLocalPort(); - LOGGER.debug("UDP: " + localUdpSocket.getLocalPort()); + LOGGER.fine("UDP: " + localUdpSocket.getLocalPort()); } catch (IOException e) { e.printStackTrace(); @@ -77,11 +78,11 @@ public class TcpUdpBridgeClient { localUdpSocket.receive(p); if (p.getLength() == 0) continue; - LOGGER.debug("UDP Client Received and Sending to TCP Server:"+new String(p.getData(),0,p.getLength(),"UTF-8")); + LOGGER.fine("UDP Client Received and Sending to TCP Server:"+new String(p.getData(),0,p.getLength(),"UTF-8")); out.write(p.getData(), 0, p.getLength()); out.flush(); - LOGGER.debug("Client Flush"); + LOGGER.fine("Client Flush"); } @@ -108,7 +109,7 @@ public class TcpUdpBridgeClient { int s = in.read(b); //if (s == -1) continue; - LOGGER.debug("TCP Client:" +new String(b,0,s,"UTF-8")); + LOGGER.fine("TCP Client:" +new String(b,0,s,"UTF-8")); DatagramPacket udpPacket = new DatagramPacket(b, s); diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeServer.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeServer.java index c4f50a67c..3d069426b 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeServer.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TcpUdpBridgeServer.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.jivesoftware.smackx.jingle.nat; import java.io.IOException; @@ -22,8 +25,7 @@ import java.net.DatagramSocket; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; - -import org.jivesoftware.smackx.jingle.SmackLogger; +import java.util.logging.Logger; /** * A Simple and Experimental Bridge. @@ -32,7 +34,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public class TcpUdpBridgeServer { - private static final SmackLogger LOGGER = SmackLogger.getLogger(TcpUdpBridgeServer.class); + private static final Logger LOGGER = Logger.getLogger(TcpUdpBridgeServer.class.getName()); private String remoteTcpHost = null; private String remoteUdpHost = null; @@ -54,7 +56,7 @@ public class TcpUdpBridgeServer { serverTcpSocket = new ServerSocket(remoteTcpPort); localUdpSocket = new DatagramSocket(0); localUdpPort = localUdpSocket.getLocalPort(); - LOGGER.debug("UDP: " + localUdpSocket.getLocalPort()); + LOGGER.fine("UDP: " + localUdpSocket.getLocalPort()); } catch (IOException e) { e.printStackTrace(); @@ -78,11 +80,11 @@ public class TcpUdpBridgeServer { localUdpSocket.receive(p); if (p.getLength() == 0) continue; - LOGGER.debug("UDP Server Received and Sending to TCP Client:" + new String(p.getData(), 0, p.getLength(), "UTF-8")); + LOGGER.fine("UDP Server Received and Sending to TCP Client:" + new String(p.getData(), 0, p.getLength(), "UTF-8")); out.write(p.getData(), 0, p.getLength()); out.flush(); - LOGGER.debug("Server Flush"); + LOGGER.fine("Server Flush"); } } @@ -109,7 +111,7 @@ public class TcpUdpBridgeServer { int s = in.read(b); //if (s == -1) continue; - LOGGER.debug("TCP Server:" + new String(b, 0, s, "UTF-8")); + LOGGER.fine("TCP Server:" + new String(b, 0, s, "UTF-8")); DatagramPacket udpPacket = new DatagramPacket(b, s); diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TestResult.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TestResult.java index 600e48a6b..3e9b95304 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TestResult.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TestResult.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.nat; /** diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportCandidate.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportCandidate.java index 8a5570b24..addd4a6a1 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportCandidate.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportCandidate.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.nat; import java.io.IOException; @@ -25,10 +26,10 @@ import java.net.UnknownHostException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.Connection; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.nat.TransportResolverListener.Checker; /** @@ -42,7 +43,7 @@ import org.jivesoftware.smackx.jingle.nat.TransportResolverListener.Checker; */ public abstract class TransportCandidate { - private static final SmackLogger LOGGER = SmackLogger.getLogger(TransportCandidate.class); + private static final Logger LOGGER = Logger.getLogger(TransportCandidate.class.getName()); private String name; @@ -651,14 +652,14 @@ public abstract class TransportCandidate { public void run() { try { - LOGGER.debug("Listening for ECHO: " + socket.getLocalAddress().getHostAddress() + ":" + socket.getLocalPort()); + LOGGER.fine("Listening for ECHO: " + socket.getLocalAddress().getHostAddress() + ":" + socket.getLocalPort()); while (true) { DatagramPacket packet = new DatagramPacket(new byte[150], 150); socket.receive(packet); - //LOGGER.debug("ECHO Packet Received in: " + socket.getLocalAddress().getHostAddress() + ":" + socket.getLocalPort() + " From: " + packet.getAddress().getHostAddress() + ":" + packet.getPort()); + //LOGGER.fine("ECHO Packet Received in: " + socket.getLocalAddress().getHostAddress() + ":" + socket.getLocalPort() + " From: " + packet.getAddress().getHostAddress() + ":" + packet.getPort()); boolean accept = false; @@ -747,7 +748,7 @@ public abstract class TransportCandidate { public boolean datagramReceived(DatagramPacket datagramPacket) { try { - LOGGER.debug("ECHO Received to: " + candidate.getIp() + ":" + candidate.getPort() + " data: " + new String(datagramPacket.getData(), "UTF-8")); + LOGGER.fine("ECHO Received to: " + candidate.getIp() + ":" + candidate.getPort() + " data: " + new String(datagramPacket.getData(), "UTF-8")); String str[] = new String(datagramPacket.getData(), "UTF-8").split(";"); String pass = str[0]; String addr[] = str[1].split(":"); @@ -757,7 +758,7 @@ public abstract class TransportCandidate { if (pass.equals(password) && transportCandidate.getIp().indexOf(ip) != -1 && transportCandidate.getPort() == Integer.parseInt(pt)) { - LOGGER.debug("ECHO OK: " + candidate.getIp() + ":" + candidate.getPort() + " <-> " + transportCandidate.getIp() + ":" + transportCandidate.getPort()); + LOGGER.fine("ECHO OK: " + candidate.getIp() + ":" + candidate.getPort() + " <-> " + transportCandidate.getIp() + ":" + transportCandidate.getPort()); TestResult testResult = new TestResult(); testResult.setResult(true); ended = true; @@ -770,7 +771,7 @@ public abstract class TransportCandidate { e.printStackTrace(); } - LOGGER.debug("ECHO Wrong Data: " + datagramPacket.getAddress().getHostAddress() + ":" + datagramPacket.getPort()); + LOGGER.fine("ECHO Wrong Data: " + datagramPacket.getAddress().getHostAddress() + ":" + datagramPacket.getPort()); return false; } }; diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportNegotiator.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportNegotiator.java index faa26a878..23a210e95 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportNegotiator.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportNegotiator.java @@ -6,7 +6,7 @@ * 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 + * 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, @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; @@ -30,7 +31,6 @@ import org.jivesoftware.smackx.jingle.JingleException; import org.jivesoftware.smackx.jingle.JingleNegotiator; import org.jivesoftware.smackx.jingle.JingleNegotiatorState; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.listeners.JingleListener; import org.jivesoftware.smackx.jingle.listeners.JingleTransportListener; import org.jivesoftware.smackx.packet.Jingle; @@ -49,7 +49,7 @@ import org.jivesoftware.smackx.packet.JingleTransport.JingleTransportCandidate; */ public abstract class TransportNegotiator extends JingleNegotiator { - private static final SmackLogger LOGGER = SmackLogger.getLogger(TransportNegotiator.class); + private static final Logger LOGGER = Logger.getLogger(TransportNegotiator.class.getName()); // The time we give to the candidates check before we accept or decline the // transport (in milliseconds) @@ -139,7 +139,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { return; } } - LOGGER.debug("BEST: ip=" + bestLocalCandidate.getIp() + " port=" + bestLocalCandidate.getPort() + " has not been offered."); + LOGGER.fine("BEST: ip=" + bestLocalCandidate.getIp() + " port=" + bestLocalCandidate.getPort() + " has not been offered."); //throw new XMPPException("Local transport candidate has not be offered."); } @@ -435,7 +435,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { // Add the candidate to the list if (remoteCandidate != null) { synchronized (validRemoteCandidates) { - LOGGER.debug("Added valid candidate: " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort()); + LOGGER.fine("Added valid candidate: " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort()); validRemoteCandidates.add(remoteCandidate); } } @@ -563,7 +563,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { if (!(resolver.isResolving() || resolver.isResolved())) { // Resolve our IP and port - LOGGER.debug("RESOLVER CALLED"); + LOGGER.fine("RESOLVER CALLED"); resolver.resolve(session); } } @@ -728,14 +728,14 @@ public abstract class TransportNegotiator extends JingleNegotiator { if (!accepted.isEmpty()) { for (TransportCandidate cand : accepted) { - LOGGER.debug("Remote acccepted candidate addr: " + cand.getIp()); + LOGGER.fine("Remote acccepted candidate addr: " + cand.getIp()); } TransportCandidate cand = (TransportCandidate) accepted.get(0); setAcceptedLocalCandidate(cand); if (isEstablished()) { - LOGGER.debug(cand.getIp() + " is set active"); + LOGGER.fine(cand.getIp() + " is set active"); //setNegotiatorState(JingleNegotiatorState.SUCCEEDED); } } @@ -749,7 +749,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { private IQ receiveSessionAcceptAction(Jingle jingle) { IQ response = null; - LOGGER.debug("Transport stabilished"); + LOGGER.fine("Transport stabilished"); //triggerTransportEstablished(getAcceptedLocalCandidate(), getBestRemoteCandidate()); //setNegotiatorState(JingleNegotiatorState.SUCCEEDED); @@ -768,7 +768,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { for (JingleListener li : listeners) { if (li instanceof JingleTransportListener) { JingleTransportListener mli = (JingleTransportListener) li; - LOGGER.debug("triggerTransportEstablished " + local.getLocalIp() + ":" + local.getPort() + " <-> " + LOGGER.fine("triggerTransportEstablished " + local.getLocalIp() + ":" + local.getPort() + " <-> " + remote.getIp() + ":" + remote.getPort()); mli.transportEstablished(local, remote); } @@ -828,10 +828,10 @@ public abstract class TransportNegotiator extends JingleNegotiator { // Hopefully, we only have one validRemoteCandidate ArrayList cands = getValidRemoteCandidatesList(); if (!cands.isEmpty()) { - LOGGER.debug("RAW CAND"); + LOGGER.fine("RAW CAND"); return (TransportCandidate) cands.get(0); } else { - LOGGER.debug("No Remote Candidate"); + LOGGER.fine("No Remote Candidate"); return null; } } @@ -897,7 +897,7 @@ public abstract class TransportNegotiator extends JingleNegotiator { } if (result != null && result.getType().equals("relay")) - LOGGER.debug("Relay Type"); + LOGGER.fine("Relay Type"); return result; } diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolver.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolver.java index c05fdadae..d2b61c135 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolver.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolver.java @@ -1,4 +1,6 @@ /** + * + * Copyright the original author or authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.jivesoftware.smackx.jingle.nat; import java.io.IOException; @@ -21,10 +22,10 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.jingle.JingleSession; -import org.jivesoftware.smackx.jingle.SmackLogger; /** * A TransportResolver is used for obtaining a list of valid transport @@ -36,7 +37,7 @@ import org.jivesoftware.smackx.jingle.SmackLogger; */ public abstract class TransportResolver { - private static final SmackLogger LOGGER = SmackLogger.getLogger(TransportResolver.class); + private static final Logger LOGGER = Logger.getLogger(TransportResolver.class.getName()); public enum Type { @@ -213,7 +214,7 @@ public abstract class TransportResolver { TransportResolverListener trl = iter.next(); if (trl instanceof TransportResolverListener.Resolver) { TransportResolverListener.Resolver li = (TransportResolverListener.Resolver) trl; - LOGGER.debug("triggerCandidateAdded : " + cand.getLocalIp()); + LOGGER.fine("triggerCandidateAdded : " + cand.getLocalIp()); li.candidateAdded(cand); } } @@ -303,7 +304,7 @@ public abstract class TransportResolver { Collections.sort(cands); // Return the last candidate result = (TransportCandidate) cands.get(cands.size() - 1); - LOGGER.debug("Result: " + result.getIp()); + LOGGER.fine("Result: " + result.getIp()); } return result; @@ -355,12 +356,12 @@ public abstract class TransportResolver { public void initializeAndWait() throws XMPPException { this.initialize(); try { - LOGGER.debug("Initializing transport resolver..."); + LOGGER.fine("Initializing transport resolver..."); while (!this.isInitialized()) { - LOGGER.debug("Resolver init still pending"); + LOGGER.fine("Resolver init still pending"); Thread.sleep(1000); } - LOGGER.debug("Transport resolved\n"); + LOGGER.fine("Transport resolved"); } catch (Exception e) { e.printStackTrace(); diff --git a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolverListener.java b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolverListener.java index 1f41438f4..fac6a0d63 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolverListener.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/jingle/nat/TransportResolverListener.java @@ -6,7 +6,7 @@ * 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 + * 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, diff --git a/jingle/src/main/java/org/jivesoftware/smackx/package.html b/jingle/src/main/java/org/jivesoftware/smackx/package.html deleted file mode 100644 index d574a2a4d..000000000 --- a/jingle/src/main/java/org/jivesoftware/smackx/package.html +++ /dev/null @@ -1 +0,0 @@ -Smack extensions API. \ No newline at end of file diff --git a/jingle/src/main/java/org/jivesoftware/smackx/packet/JingleDescription.java b/jingle/src/main/java/org/jivesoftware/smackx/packet/JingleDescription.java index ad840a504..667cfd740 100644 --- a/jingle/src/main/java/org/jivesoftware/smackx/packet/JingleDescription.java +++ b/jingle/src/main/java/org/jivesoftware/smackx/packet/JingleDescription.java @@ -20,9 +20,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.logging.Logger; import org.jivesoftware.smack.packet.PacketExtension; -import org.jivesoftware.smackx.jingle.SmackLogger; import org.jivesoftware.smackx.jingle.media.PayloadType; /** @@ -32,7 +32,7 @@ import org.jivesoftware.smackx.jingle.media.PayloadType; */ public abstract class JingleDescription implements PacketExtension { - private static final SmackLogger LOGGER = SmackLogger.getLogger(JingleDescription.class); + private static final Logger LOGGER = Logger.getLogger(JingleDescription.class.getName()); // static @@ -73,7 +73,7 @@ public abstract class JingleDescription implements PacketExtension { public void addPayloadType(final PayloadType pt) { synchronized (payloads) { if (pt == null) { - LOGGER.error("Null payload type"); + LOGGER.severe("Null payload type"); } else { payloads.add(pt); } diff --git a/settings.gradle b/settings.gradle index e116bf495..70f449e85 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,3 @@ include 'core', 'extensions', 'experimental', 'debug', 'resolver-dnsjava', 'resolver-javax', - 'compression-jzlib', 'legacy' \ No newline at end of file + 'compression-jzlib', 'legacy', 'jingle' \ No newline at end of file