Full Code of lining90567/leo-im-server for AI

master 35759b9caf08 cached
357 files
517.4 KB
150.7k tokens
1012 symbols
1 requests
Download .txt
Showing preview only (640K chars total). Download the full file or copy to clipboard to get everything.
Repository: lining90567/leo-im-server
Branch: master
Commit: 35759b9caf08
Files: 357
Total size: 517.4 KB

Directory structure:
gitextract_5xra_4nj/

├── .classpath
├── .gitignore
├── .project
├── .settings/
│   ├── org.eclipse.core.resources.prefs
│   ├── org.eclipse.jdt.core.prefs
│   └── org.eclipse.m2e.core.prefs
├── LICENSE
├── README.md
├── assemble/
│   ├── bin/
│   │   ├── run.bat
│   │   └── run.sh
│   └── package.xml
├── leo-im-api/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── api/
│   │   │                       ├── annotation/
│   │   │                       │   ├── Cacheable.java
│   │   │                       │   └── Transactional.java
│   │   │                       ├── dto/
│   │   │                       │   ├── ChannelDTO.java
│   │   │                       │   ├── ChannelListDTO.java
│   │   │                       │   ├── ChannelMemberDTO.java
│   │   │                       │   ├── FileDTO.java
│   │   │                       │   ├── MessageDTO.java
│   │   │                       │   ├── UserChannelDTO.java
│   │   │                       │   └── UserDTO.java
│   │   │                       ├── exception/
│   │   │                       │   └── ServiceException.java
│   │   │                       └── service/
│   │   │                           ├── ChannelService.java
│   │   │                           ├── MessageService.java
│   │   │                           ├── UnreadMessageCountService.java
│   │   │                           ├── UserChannelService.java
│   │   │                           └── UserService.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── api/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-api/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.api.AppTest.xml
│           └── org.leo.im.api.AppTest.txt
├── leo-im-api-provider/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── api/
│   │   │                       └── provider/
│   │   │                           └── ServiceFactory.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── api/
│   │                           └── provider/
│   │                               └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-api-provider/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.api.provider.AppTest.xml
│           └── org.leo.im.api.provider.AppTest.txt
├── leo-im-common/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── common/
│   │   │                       └── data/
│   │   │                           └── Page.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── common/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-common/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.common.AppTest.xml
│           └── org.leo.im.common.AppTest.txt
├── leo-im-http/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── http/
│   │   │                       ├── HttpServer.java
│   │   │                       ├── cache/
│   │   │                       │   ├── Cache.java
│   │   │                       │   ├── CacheManager.java
│   │   │                       │   ├── CacheManagerFactory.java
│   │   │                       │   └── MapCacheManager.java
│   │   │                       ├── constant/
│   │   │                       │   └── CacheKeys.java
│   │   │                       ├── controller/
│   │   │                       │   ├── AuthController.java
│   │   │                       │   ├── BaseController.java
│   │   │                       │   ├── ChannelController.java
│   │   │                       │   ├── ExceptionController.java
│   │   │                       │   ├── MessageController.java
│   │   │                       │   ├── UserChannelController.java
│   │   │                       │   └── UserController.java
│   │   │                       ├── exception/
│   │   │                       │   └── NoSuchSettingException.java
│   │   │                       ├── file/
│   │   │                       │   ├── AbstractLocalFileStorage.java
│   │   │                       │   ├── AvatarStorage.java
│   │   │                       │   ├── AvatarStorageFactory.java
│   │   │                       │   ├── FileStorage.java
│   │   │                       │   ├── FileStorageFactory.java
│   │   │                       │   ├── LocalAvatarStorage.java
│   │   │                       │   └── LocalFileStorage.java
│   │   │                       ├── interceptor/
│   │   │                       │   ├── AuthenticationInterceptor.java
│   │   │                       │   └── CorsInterceptor.java
│   │   │                       ├── util/
│   │   │                       │   └── JwtUtils.java
│   │   │                       └── vo/
│   │   │                           ├── ChannelListVO.java
│   │   │                           ├── ChannelVO.java
│   │   │                           ├── MessageVO.java
│   │   │                           └── UserChannelVO.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── http/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-http/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.http.AppTest.xml
│           └── org.leo.im.http.AppTest.txt
├── leo-im-migration/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/
│   │   │   │   └── org/
│   │   │   │       └── leo/
│   │   │   │           └── im/
│   │   │   │               └── migration/
│   │   │   │                   └── FlywayMigration.java
│   │   │   └── resources/
│   │   │       └── db/
│   │   │           └── migration/
│   │   │               └── V20180615___Init.sql
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── migration/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   ├── META-INF/
│       │   │   ├── MANIFEST.MF
│       │   │   └── maven/
│       │   │       └── org.leo.im/
│       │   │           └── leo-im-migration/
│       │   │               ├── pom.properties
│       │   │               └── pom.xml
│       │   └── db/
│       │       └── migration/
│       │           └── V20180615___Init.sql
│       ├── maven-archiver/
│       │   └── pom.properties
│       └── maven-status/
│           └── maven-compiler-plugin/
│               └── compile/
│                   └── default-compile/
│                       ├── createdFiles.lst
│                       └── inputFiles.lst
├── leo-im-model/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── model/
│   │   │                       ├── Channel.java
│   │   │                       ├── ChannelMember.java
│   │   │                       ├── File.java
│   │   │                       ├── Message.java
│   │   │                       ├── User.java
│   │   │                       └── UserChannel.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── model/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-model/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.model.AppTest.xml
│           └── org.leo.im.model.AppTest.txt
├── leo-im-notification/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── notification/
│   │   │                       ├── ActionNames.java
│   │   │                       ├── PublishKeys.java
│   │   │                       ├── Publisher.java
│   │   │                       ├── PublisherFactory.java
│   │   │                       ├── QueuePublisher.java
│   │   │                       ├── Subscriber.java
│   │   │                       ├── ThreadPoolHolder.java
│   │   │                       └── event/
│   │   │                           ├── AvatarChangedEvent.java
│   │   │                           ├── ChannelCreatedEvent.java
│   │   │                           ├── ChannelNameChangedEvent.java
│   │   │                           ├── ChannelRemovedEvent.java
│   │   │                           ├── JoinChannelEvent.java
│   │   │                           ├── LeaveChannelEvent.java
│   │   │                           ├── MembersCountChangedEvent.java
│   │   │                           ├── MessageRemovedEvent.java
│   │   │                           ├── NewMessageEvent.java
│   │   │                           ├── NicknameChangedEvent.java
│   │   │                           ├── NotificationEvent.java
│   │   │                           ├── OnlineStatusChangedEvent.java
│   │   │                           ├── ReadMessageEvent.java
│   │   │                           └── RemoveFromChannelEvent.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── notification/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-notification/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.notification.AppTest.xml
│           └── org.leo.im.notification.AppTest.txt
├── leo-im-service/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── service/
│   │   │                       ├── ChannelServiceImpl.java
│   │   │                       ├── MessageServiceImpl.java
│   │   │                       ├── UnreadMessageCountServiceImpl.java
│   │   │                       ├── UserChannelServiceImpl.java
│   │   │                       ├── UserServiceImpl.java
│   │   │                       ├── support/
│   │   │                       │   ├── CacheableHolder.java
│   │   │                       │   └── ServiceProxy.java
│   │   │                       └── util/
│   │   │                           └── PasswordUtils.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── service/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-service/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.service.AppTest.xml
│           └── org.leo.im.service.AppTest.txt
├── leo-im-socket/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── socket/
│   │   │                       ├── ChannelIdSet.java
│   │   │                       ├── ChannelsHolder.java
│   │   │                       ├── SocketChannel.java
│   │   │                       ├── WebSocketChannelInitializer.java
│   │   │                       ├── WebSocketServer.java
│   │   │                       ├── exception/
│   │   │                       │   └── MessageHandleException.java
│   │   │                       ├── handler/
│   │   │                       │   └── TextWebSocketFrameHandler.java
│   │   │                       └── subscription/
│   │   │                           ├── QueueSubscriber.java
│   │   │                           ├── SubscriberFactory.java
│   │   │                           └── handler/
│   │   │                               ├── AbstractMessageHandler.java
│   │   │                               ├── AvatarChangedHandler.java
│   │   │                               ├── ChannelCreatedHandler.java
│   │   │                               ├── ChannelNameChangedHandler.java
│   │   │                               ├── ChannelRemovedHandler.java
│   │   │                               ├── JoinChannelHandler.java
│   │   │                               ├── LeaveChannelHandler.java
│   │   │                               ├── MembersCountChangedHandler.java
│   │   │                               ├── MessageHandler.java
│   │   │                               ├── MessageHandlerFactory.java
│   │   │                               ├── NewMessageHandler.java
│   │   │                               ├── NicknameChangedHandler.java
│   │   │                               ├── OnlineStatusChangedHandler.java
│   │   │                               ├── ReadMessageHandler.java
│   │   │                               ├── RemoveFromChannelHandler.java
│   │   │                               └── RemoveMessageHandler.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── socket/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-socket/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.socket.AppTest.xml
│           └── org.leo.im.socket.AppTest.txt
├── leo-im-starter/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   ├── conf/
│   │   │   │   └── app.conf
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── starter/
│   │   │                       └── App.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── starter/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-starter/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── leo-im-starter-1.0/
│       │   ├── bin/
│       │   │   ├── run.bat
│       │   │   └── run.sh
│       │   └── conf/
│       │       └── app.conf
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.starter.AppTest.xml
│           └── org.leo.im.starter.AppTest.txt
├── leo-im-store/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── store/
│   │   │                       ├── connection/
│   │   │                       │   ├── ConnectionFactory.java
│   │   │                       │   ├── ConnectionProvider.java
│   │   │                       │   └── impl/
│   │   │                       │       └── PoolConnectionFactory.java
│   │   │                       ├── dao/
│   │   │                       │   ├── BaseDAO.java
│   │   │                       │   ├── ChannelDAO.java
│   │   │                       │   ├── ChannelMemberDAO.java
│   │   │                       │   ├── FileDAO.java
│   │   │                       │   ├── HideChannelDAO.java
│   │   │                       │   ├── MessageDAO.java
│   │   │                       │   ├── UnreadMessageCountDAO.java
│   │   │                       │   ├── UserChannelDAO.java
│   │   │                       │   ├── UserDAO.java
│   │   │                       │   └── impl/
│   │   │                       │       ├── JdbcChannelDAOImpl.java
│   │   │                       │       ├── JdbcChannelMemberDAOImpl.java
│   │   │                       │       ├── JdbcFileDAOImpl.java
│   │   │                       │       ├── JdbcHideChannelDAOImpl.java
│   │   │                       │       ├── JdbcMessageDAOImpl.java
│   │   │                       │       ├── JdbcUnreadMessageCountDAOImpl.java
│   │   │                       │       ├── JdbcUserChannelDAOImpl.java
│   │   │                       │       └── JdbcUserDAOImpl.java
│   │   │                       ├── datasource/
│   │   │                       │   ├── ConnectionPool.java
│   │   │                       │   └── impl/
│   │   │                       │       └── DruidConnectionPool.java
│   │   │                       ├── exception/
│   │   │                       │   └── DAOException.java
│   │   │                       ├── factory/
│   │   │                       │   └── DAOFactory.java
│   │   │                       ├── support/
│   │   │                       │   ├── BatchSqlBuildResult.java
│   │   │                       │   ├── Parameter.java
│   │   │                       │   ├── ParameterDataTypeEnum.java
│   │   │                       │   └── SqlBuildResult.java
│   │   │                       └── util/
│   │   │                           ├── DbUtils.java
│   │   │                           └── FirstLetterUtil.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── store/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-store/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.store.AppTest.xml
│           └── org.leo.im.store.AppTest.txt
├── leo-im-util/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── util/
│   │   │                       ├── BeanUtils.java
│   │   │                       └── JwtUtils.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── util/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-util/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.util.AppTest.xml
│           └── org.leo.im.util.AppTest.txt
└── pom.xml

================================================
FILE CONTENTS
================================================

================================================
FILE: .classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: .gitignore
================================================
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


================================================
FILE: .project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: .settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding/<project>=UTF-8


================================================
FILE: .settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: .settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   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.


================================================
FILE: README.md
================================================
# ![Leo-IM](https://raw.githubusercontent.com/wiki/lining90567/leo-im-server/leo-im.png)

Leo-IM,开源好用的IM。

Leo-IM是基于Java语言、Netty框架、Vue+Element-UI开发的轻量级IM,服务端可独立运行(无需部署到web容器),HTTP服务和Socket服务可分开部署,使用基于Netty扩展的[netty-rest-server](https://github.com/lining90567/netty-rest-server)RESTful框架提供Web服务,简单易用,方便扩展。

## 在线演示

演示地址:<a href="http://43.138.44.47:8000" target="_blank">http://43.138.44.47:8000</a>

建议使用Chrome浏览器

- 演示用户1:用户名 test1,口令 123456
- 演示用户2:用户名 test2,口令 123456
- 演示用户3:用户名 test3,口令 123456

## 运行环境要求

- 服务端:Java8、MySQL5.5+
- 客户端:Chrome、IE10+

## 主要功能

- 私聊
- 群聊
- 文字、表情、图片、文件

## 构建与部署

- 安装netty-rest-server到本地仓库

	mvn install:install-file -Dfile=netty-rest-server-1.0.jar -DgroupId=org.leo -DartifactId=netty-rest-server -Dversion=1.0 -Dpackaging=jar

- 创建数据库,并设置字符集(my.cnf或my.ini)

	[client]
	
	default-character-set=utf8mb4

	[mysqld]
	
	character-set-client-handshake = FALSE

	character-set-server = utf8mb4

	collation-server = utf8mb4_unicode_ci

	init_connect=’SET NAMES utf8mb4'

	[mysql]
	
	default-character-set=utf8mb4

- 构建

	mvn package

- 部署

	解压leo-im-1.0.zip,修改conf/app.conf的相关配置

- 启动

	nohup bin/run.sh >/dev/null 2>&1 &
	
- Web端代码
	
	<a href="http://43.138.44.47:8000" target="_blank">https://github.com/lining90567/leo-im-web</a>
	
## 联系方式
- **邮箱** - lining90567@sina.com
- **QQ** - 328616209


================================================
FILE: assemble/bin/run.bat
================================================
@REM app launcher script
@REM
@REM Environment:
@REM JAVA_HOME - location of a JDK home dir (optional if java on path)
@setlocal enabledelayedexpansion

@echo off

cd %~dp0
cd ../

if "%JAVA_OPS%" == "" set JAVA_OPS=-Dfile.encoding=utf-8 -Dio.netty.noUnsafe=true -server -Xmx128m -Xms128m -Xss256k
java %JAVA_OPS% -Dconf.home=%cd%\conf\ -jar %cd%\lib\leo-im-starter-1.0.jar

================================================
FILE: assemble/bin/run.sh
================================================
#!/bin/sh

###  ------------------------------- ###
###  leo-im-server launcher script   ###
###  ------------------------------- ###

cd `dirname $0`
cd ../
if [ -z "$JAVA_OPS" ]; then
  JAVA_OPS="-Dfile.encoding=utf-8 -Dio.netty.noUnsafe=true -Xms128M -Xmx128M -Xss256K"
fi
java $JAVA_OPS -Dconf.home=$(pwd)/conf/ -jar  $(pwd)/lib/leo-im-starter-1.0.jar

================================================
FILE: assemble/package.xml
================================================
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd">
    <id>package</id>
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>true</includeBaseDirectory>
    <fileSets>  
        <fileSet>
            <directory>../assemble/bin</directory>
            <outputDirectory>/bin</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>src/main/conf</directory>
            <outputDirectory>/conf</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>lib</outputDirectory>
            <scope>runtime</scope>      
        </dependencySet>                
    </dependencySets>
</assembly>

================================================
FILE: leo-im-api/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: leo-im-api/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im-api</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: leo-im-api/.settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8


================================================
FILE: leo-im-api/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: leo-im-api/.settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: leo-im-api/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-api</artifactId>
	<name>leo-im-api</name>
	<url>http://maven.apache.org</url>
	<dependencies>
        <dependency>
            <groupId>org.leo.im</groupId>
            <artifactId>leo-im-common</artifactId>
            <version>${parent.version}</version>
        </dependency>       
    </dependencies>	
</project>


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/annotation/Cacheable.java
================================================
package org.leo.im.api.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 缓存注解
 * 
 * @author Leo
 * @date 2018/3/19
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE })
@Inherited
public @interface Cacheable {

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/annotation/Transactional.java
================================================
package org.leo.im.api.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;

/**
 * 事务注解,该注解需要在服务接口上使用,在实现类上使用无效。
 * 
 * @author Leo
 * @date 2018/3/19
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE })
@Inherited
public @interface Transactional {
}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelDTO.java
================================================
package org.leo.im.api.dto;

import java.util.ArrayList;
import java.util.List;

/**
 * 频道dto类
 * 
 * @author Leo
 * @date 2018/4/11
 */
public final class ChannelDTO {

    private String id;

    private String name;

    private String type;

    private int memberCount;
    
    private long createAt;
    
    private String creatorId;
    
    private String fromUserId;
    
    private String fromUsername;
    
    private String fromUserNickname;
    
    private String toUserId;
    
    private String toUsername;
    
    private String toUserNickname;
    
    private String toUserOnlineStatus;
    
    private String purpose;
    
    private List<ChannelMemberDTO> members = new ArrayList<>(128);

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(int memberCount) {
        this.memberCount = memberCount;
    }

    public long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(long createAt) {
        this.createAt = createAt;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(String fromUserId) {
        this.fromUserId = fromUserId;
    }

    public String getFromUsername() {
        return fromUsername;
    }

    public void setFromUsername(String fromUsername) {
        this.fromUsername = fromUsername;
    }

    public String getFromUserNickname() {
        return fromUserNickname;
    }

    public void setFromUserNickname(String fromUserNickname) {
        this.fromUserNickname = fromUserNickname;
    }

    public String getToUserId() {
        return toUserId;
    }

    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    public String getToUsername() {
        return toUsername;
    }

    public void setToUsername(String toUsername) {
        this.toUsername = toUsername;
    }

    public String getToUserNickname() {
        return toUserNickname;
    }

    public void setToUserNickname(String toUserNickname) {
        this.toUserNickname = toUserNickname;
    }

    public String getToUserOnlineStatus() {
        return toUserOnlineStatus;
    }

    public void setToUserOnlineStatus(String toUserOnlineStatus) {
        this.toUserOnlineStatus = toUserOnlineStatus;
    }

    public List<ChannelMemberDTO> getMembers() {
        return members;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    @Override
    public String toString() {
        return "ChannelDTO [id=" + id + ", name=" + name + ", type=" + type + ", memberCount=" + memberCount
                + ", createAt=" + createAt + ", creatorId=" + creatorId + ", fromUserId=" + fromUserId
                + ", fromUsername=" + fromUsername + ", fromUserNickname=" + fromUserNickname + ", toUserId=" + toUserId
                + ", toUsername=" + toUsername + ", toUserNickname=" + toUserNickname + ", toUserOnlineStatus="
                + toUserOnlineStatus + ", purpose=" + purpose + ", members=" + members + "]";
    }

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelListDTO.java
================================================
package org.leo.im.api.dto;

/**
 * Channel列表DTO
 * 
 * @author Leo
 * @date 2018/3/30
 */
public class ChannelListDTO {

    private String id;

    private String name;
    
    private String displayName;

    private String otherSideOnlineStatus;

    private String type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getOtherSideOnlineStatus() {
        return otherSideOnlineStatus;
    }

    public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
        this.otherSideOnlineStatus = otherSideOnlineStatus;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "ChannelListDTO [id=" + id + ", name=" + name + ", displayName=" + displayName
                + ", otherSideOnlineStatus=" + otherSideOnlineStatus + ", type=" + type + "]";
    }
    
}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelMemberDTO.java
================================================
package org.leo.im.api.dto;

/**
 * 频道成员dto类
 * 
 * @author Leo
 * @date 2018/4/11
 */
public class ChannelMemberDTO {
    
    private String id;
    
    private String nickname;
    
    private boolean admin;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public boolean getAdmin() {
        return admin;
    }

    public void setAdmin(boolean admin) {
        this.admin = admin;
    }

    @Override
    public String toString() {
        return "ChannelMemberDTO [id=" + id + ", nickname=" + nickname + ", admin=" + admin + "]";
    }

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/FileDTO.java
================================================
package org.leo.im.api.dto;

/**
 * 文件dto类
 * 
 * @author Leo
 * @date 2018/6/13
 */
public class FileDTO {
    
    private String id;
    
    private String name;
    
    private String extension;
    
    private int size;
    
    private String mimeType;
    
    private int width;
    
    private int height;
    
    private short thumbWidth;
    
    private short thumbHeight;
    
    private String path;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public short getThumbWidth() {
        return thumbWidth;
    }

    public void setThumbWidth(short thumbWidth) {
        this.thumbWidth = thumbWidth;
    }

    public short getThumbHeight() {
        return thumbHeight;
    }

    public void setThumbHeight(short thumbHeight) {
        this.thumbHeight = thumbHeight;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public String toString() {
        return "FileDTO [id=" + id + ", name=" + name + ", extension=" + extension + ", size=" + size + ", mimeType="
                + mimeType + ", width=" + width + ", height=" + height + ", thumbWidth=" + thumbWidth + ", thumbHeight="
                + thumbHeight + ", path=" + path + "]";
    }

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/MessageDTO.java
================================================
package org.leo.im.api.dto;

/**
 * 消息dto类
 * 
 * @author Leo
 * @date 2018/5/15
 */
public class MessageDTO {

    private long id;
    
    private String channelId;
    
    private String channelType;

    private long createAt;

    private String type;

    private String senderId;

    private String senderName;

    private String senderNickname;

    private String senderOnlineStatus;

    private String senderAvatarUrl;
    
    private String senderFirstLetterOfName;
    
    private String content;
    
    private String fileId;
    
    private String fileName;
    
    private String fileExtension;
    
    private int fileSize;
    
    private String fileMimeType;
    
    private int imageWidth;
    
    private int imageHeight;
    
    private short imageThumbWidth;
    
    private short imageThumbHeight;    
    
    private String filePath;
    
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(long createAt) {
        this.createAt = createAt;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderNickname() {
        return senderNickname;
    }

    public void setSenderNickname(String senderNickname) {
        this.senderNickname = senderNickname;
    }

    public String getSenderOnlineStatus() {
        return senderOnlineStatus;
    }

    public void setSenderOnlineStatus(String senderOnlineStatus) {
        this.senderOnlineStatus = senderOnlineStatus;
    }

    public String getSenderAvatarUrl() {
        return senderAvatarUrl;
    }

    public void setSenderAvatarUrl(String senderAvatarUrl) {
        this.senderAvatarUrl = senderAvatarUrl;
    }

    public String getSenderFirstLetterOfName() {
        return senderFirstLetterOfName;
    }

    public void setSenderFirstLetterOfName(String senderFirstLetterOfName) {
        this.senderFirstLetterOfName = senderFirstLetterOfName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFileMimeType() {
        return fileMimeType;
    }

    public void setFileMimeType(String fileMimeType) {
        this.fileMimeType = fileMimeType;
    }

    public int getImageWidth() {
        return imageWidth;
    }

    public void setImageWidth(int imageWidth) {
        this.imageWidth = imageWidth;
    }

    public int getImageHeight() {
        return imageHeight;
    }

    public void setImageHeight(int imageHeight) {
        this.imageHeight = imageHeight;
    }

    public short getImageThumbWidth() {
        return imageThumbWidth;
    }

    public void setImageThumbWidth(short imageThumbWidth) {
        this.imageThumbWidth = imageThumbWidth;
    }

    public short getImageThumbHeight() {
        return imageThumbHeight;
    }

    public void setImageThumbHeight(short imageThumbHeight) {
        this.imageThumbHeight = imageThumbHeight;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileExtension() {
        return fileExtension;
    }

    public void setFileExtension(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    public int getFileSize() {
        return fileSize;
    }

    public void setFileSize(int fileSize) {
        this.fileSize = fileSize;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getSenderRealAvatarUrl() {
        if("http://".equalsIgnoreCase(this.senderAvatarUrl) || "https://".equalsIgnoreCase(this.senderAvatarUrl)) {
            return this.senderAvatarUrl;
        }
        if(this.senderAvatarUrl != null && !this.senderAvatarUrl.trim().isEmpty()) {
            return this.senderAvatarUrl;
        }
        return null;
    }

    @Override
    public String toString() {
        return "MessageDTO [id=" + id + ", channelId=" + channelId + ", channelType=" + channelType + ", createAt="
                + createAt + ", type=" + type + ", senderId=" + senderId + ", senderName=" + senderName
                + ", senderNickname=" + senderNickname + ", senderOnlineStatus=" + senderOnlineStatus
                + ", senderAvatarUrl=" + senderAvatarUrl + ", senderFirstLetterOfName=" + senderFirstLetterOfName
                + ", content=" + content + ", fileId=" + fileId + ", fileName=" + fileName + ", fileExtension="
                + fileExtension + ", fileSize=" + fileSize + ", fileMimeType=" + fileMimeType + ", imageWidth="
                + imageWidth + ", imageHeight=" + imageHeight + ", imageThumbWidth=" + imageThumbWidth
                + ", imageThumbHeight=" + imageThumbHeight + ", filePath=" + filePath + "]";
    }
    
}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/UserChannelDTO.java
================================================
package org.leo.im.api.dto;

/**
 * 用户频道dto类
 * 
 * @author Leo
 * @date 2018/4/20
 */
public class UserChannelDTO {

    private String channelId;
    
    private String channelName;
    
    private String channelType;
    
    private String channelDisplayName;
    
    private String channelDescription;
    
    private String toUserId;
    
    private String toUserOnlineStatus;
    
    private short unreadMessageCount;
    
    private int memberCount;
    
    private String creatorId;

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public String getChannelDisplayName() {
        return channelDisplayName;
    }

    public void setChannelDisplayName(String channelDisplayName) {
        this.channelDisplayName = channelDisplayName;
    }

    public String getChannelDescription() {
        return channelDescription;
    }

    public void setChannelDescription(String channelDescription) {
        this.channelDescription = channelDescription;
    }

    public String getToUserId() {
        return toUserId;
    }

    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    public String getToUserOnlineStatus() {
        return toUserOnlineStatus;
    }

    public void setToUserOnlineStatus(String toUserOnlineStatus) {
        this.toUserOnlineStatus = toUserOnlineStatus;
    }

    public short getUnreadMessageCount() {
        return unreadMessageCount;
    }

    public void setUnreadMessageCount(short unreadMessageCount) {
        this.unreadMessageCount = unreadMessageCount;
    }

    public int getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(int memberCount) {
        this.memberCount = memberCount;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    @Override
    public String toString() {
        return "UserChannelDTO [channelId=" + channelId + ", channelName=" + channelName + ", channelType="
                + channelType + ", channelDisplayName=" + channelDisplayName + ", channelDescription="
                + channelDescription + ", toUserId=" + toUserId + ", toUserOnlineStatus=" + toUserOnlineStatus
                + ", unreadMessageCount=" + unreadMessageCount + ", memberCount=" + memberCount + ", creatorId="
                + creatorId + "]";
    }
    
}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/dto/UserDTO.java
================================================
package org.leo.im.api.dto;

/**
 * 用户dto类
 * 
 * @author Leo
 * @date 2018/3/30
 */
public class UserDTO {

    private String id;

    private String name;
    
    private String firstLetterOfName;

    private String nickname;

    private String password;
    
    private String avatarUrl;
    
    private Boolean locked;
    
    private Long lastPostAt;
    
    private String onlineStatus;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFirstLetterOfName() {
        return firstLetterOfName;
    }

    public void setFirstLetterOfName(String firstLetterOfName) {
        this.firstLetterOfName = firstLetterOfName;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public Long getLastPostAt() {
        return lastPostAt;
    }

    public void setLastPostAt(Long lastPostAt) {
        this.lastPostAt = lastPostAt;
    }

    public String getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(String onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    @Override
    public String toString() {
        return "UserDTO [id=" + id + ", name=" + name + ", firstLetterOfName=" + firstLetterOfName + ", nickname="
                + nickname + ", password=" + password + ", avatarUrl=" + avatarUrl + ", locked=" + locked
                + ", lastPostAt=" + lastPostAt + ", onlineStatus=" + onlineStatus + "]";
    }

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/exception/ServiceException.java
================================================
package org.leo.im.api.exception;

/**
 * 服务异常类
 * 
 * @author Leo
 * @date 2018/3/20
 */
public final class ServiceException extends RuntimeException {

    private static final long serialVersionUID = 2447167264295739984L;

    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/service/ChannelService.java
================================================
package org.leo.im.api.service;

import java.util.List;
import java.util.Map;

import org.leo.im.api.annotation.Transactional;
import org.leo.im.api.dto.ChannelDTO;
import org.leo.im.api.dto.ChannelListDTO;
import org.leo.im.api.dto.ChannelMemberDTO;
import org.leo.im.common.data.Page;

/**
 * 频道管理服务接口
 * 
 * @author Leo
 * @date 2018/4/11
 */
public interface ChannelService {
    
    /**
     * 得到频道列表
     * @param parameters
     * @param limit
     * @return
     */
    List<ChannelListDTO> listChannel(Map<String, Object> parameters, int limit);
    
    /**
     * 得到群组频道列表
     * @param parameters
     * @param limit
     * @return
     */
    List<ChannelListDTO> listGroupChannel(Map<String, Object> parameters, int limit);
    
    /**
     * 添加频道
     * @param dto
     * @param creatorNickname
     * @return
     */
    @Transactional
    ChannelDTO saveChannel(ChannelDTO dto, String creatorNickname);
    
    /**
     * 根据id得到频道信息
     * @param id
     * @return
     */
    ChannelDTO getById(String id);
    
    /**
     * 得到用户是否为频道的管理员
     * @param userId
     * @param channelId
     * @return
     */
    boolean isAdmin(String userId, String channelId);
    
    /**
     * 更新频道名称
     * @param channelId
     * @param name
     * @return
     */
    @Transactional
    int updateName(String channelId, String name);
    
    /**
     * 更新频道用途
     * @param channelId
     * @param purpose
     * @return
     */
    @Transactional
    int updatePurpose(String channelId, String purpose);
    
    /**
     * 添加频道成员
     * @param channelId
     * @param userIds
     * @param userNicknames
     * @param admin
     * @return
     */
    @Transactional
    int addMember(String channelId, String[] userIds, String[] userNicknames, String admin);
    
    /**
     * 移除组成员
     * @param channelId
     * @param memberId
     * @param memberNickname
     * @param admin
     * @return
     */
    @Transactional
    int removeMember(String channelId, String memberId, String memberNickname, String admin);
    
    /**
     * 得到成员列表
     * @param channelId
     * @param username
     * @param limit
     * @param offset
     * @return
     */
    Page<ChannelMemberDTO> listMember(String channelId, String username, int limit, int offset);
    
    /**
     * 变更频道管理员
     * @param channelId
     * @param memberId
     * @param isAdmin
     * @return
     */
    @Transactional
    int changeAdmin(String channelId, String memberId, boolean isAdmin);
    
    /**
     * 离开频道
     * @param channelId
     * @param memberId
     * @param memberNickname
     * @return
     */
    @Transactional
    int leaveChannel(String channelId, String memberId, String memberNickname);
    
    /**
     * 删除频道
     * @param channelId
     * @param adminId
     * @return
     */
    @Transactional
    int removeChannel(String channelId, String adminId);

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/service/MessageService.java
================================================
package org.leo.im.api.service;

import java.util.List;

import org.leo.im.api.annotation.Transactional;
import org.leo.im.api.dto.FileDTO;
import org.leo.im.api.dto.MessageDTO;

/**
 * 消息服务接口
 * 
 * @author Leo
 * @date 2018/5/16
 */
public interface MessageService {

    /**
     * 得到消息列表
     * @param channelId
     * @param maxCreateAt
     * @param limit
     * @return
     */
    List<MessageDTO> listMessage(String channelId, long maxCreateAt, int limit);
    
    /**
     * 根据id得到消息
     * @param id
     * @return
     */
    MessageDTO getById(long id);
    
    /**
     * 添加消息
     * @param dto
     * @return
     */
    @Transactional
    MessageDTO saveMessage(MessageDTO dto);
    
    /**
     * 批量添加消息
     * @param dtos
     * @return
     */
    @Transactional
    int saveMessage(List<MessageDTO> dtos);
    
    /**
     * 读取消息
     * @param channelId
     * @param userId
     * @param total
     * @return
     */
    @Transactional
    int readMessage(String channelId, String userId, short total);
    
    /**
     * 删除消息
     * @param messageId
     * @param senderId
     * @param channelId
     * @param toUserId
     * @return
     */
    @Transactional
    int removeMessage(long messageId, String senderId, String channelId, String toUserId);
    
    /**
     * 添加文件
     * @param dto
     * @return
     */
    @Transactional
    String saveFile(FileDTO dto);
    
}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/service/UnreadMessageCountService.java
================================================
package org.leo.im.api.service;

import org.leo.im.api.annotation.Transactional;

/**
 * 未读消息数量服务接口
 * @author Administrator
 *
 */
public interface UnreadMessageCountService {
    
    /**
     * 批量添加未读消息数量
     * @param userIds
     * @param channelId
     * @param total
     * @return
     */
    @Transactional
    int batchSaveUnreadMessageCount(String[] userIds, String channelId, short total);
    
    /**
     * 更新未读消息数量
     * @param userId
     * @param channelId
     * @param total
     * @return
     */
    @Transactional
    int updateUnreadMessageCount(String userId, String channelId, short total);
    
    /**
     * 批量更新未读消息数量
     * @param userIds
     * @param channelId
     * @param total
     * @return
     */
    int batchUpdateUnreadMessageCount(String[] userIds, String channelId, short total);
    
    /**
     * 批量增加未读消息数量
     * @param userIds
     * @param channelId
     * @param quantity
     * @return
     */
    @Transactional
    int batchIncreaseUnreadMessageCount(String[] userIds, String channelId, short quantity);
    
    /**
     * 增加未读消息数量
     * @param userId
     * @param channelId
     * @param quantity
     * @return
     */
    @Transactional
    int increaseUnreadMessageCount(String userId, String channelId, short quantity);

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/service/UserChannelService.java
================================================
package org.leo.im.api.service;

import java.util.List;

import org.leo.im.api.annotation.Transactional;
import org.leo.im.api.dto.UserChannelDTO;

/**
 * 用户频道服务接口
 * 
 * @author Leo
 * @date 2018/4/20
 */
public interface UserChannelService {
    
    /**
     * 得到用户频道列表
     * @param userId
     * @param type
     * @param limit
     * @return
     */
    List<UserChannelDTO> listUserChannel(String userId, String type, int limit);
    
    /**
     * 得到用户频道
     * @param userId
     * @param channelId
     * @return
     */
    UserChannelDTO get(String userId, String channelId);
    
    /**
     * 更新用户频道
     * @param channelId
     * @param userId
     * @param displayName
     * @return
     */
    @Transactional
    int updateDisplayName(String channelId, String userId, String displayName);
    
    /**
     * 隐藏频道
     * @param userId
     * @param channelId
     * @return
     */
    @Transactional
    int hideChannel(String userId, String channelId);
    
    /**
     * 根据名称得到用户频道列表
     * @param userId
     * @param name
     * @param type
     * @return
     */
    List<UserChannelDTO> listByName(String userId, String name, String type);

}


================================================
FILE: leo-im-api/src/main/java/org/leo/im/api/service/UserService.java
================================================
package org.leo.im.api.service;

import java.util.Set;

import org.leo.im.api.annotation.Transactional;
import org.leo.im.api.dto.UserDTO;
import org.leo.im.common.data.Page;

/**
 * 用户服务接口
 * 
 * @author Leo
 * @date 2018/4/9
 */
public interface UserService {

    /**
     * 验证用户登录
     * 
     * @param loginName
     * @param password
     * @return
     */
    UserDTO verifyLogin(String loginName, String password);

    /**
     * 根据id得到用户
     * 
     * @param id
     * @return
     */
    UserDTO getById(String id);

    /**
     * 添加用户
     * 
     * @param dto
     * @return
     */
    @Transactional
    String saveUser(UserDTO dto);

    /**
     * 根据名称或昵称分页查询用户
     * 
     * @param name
     * @param limit
     * @param offset
     * @return
     */
    Page<UserDTO> listByNameOrNickname(String name, int limit, int offset);
    
    /**
     * 更新用户
     * @param dto
     * @param updateNullValueField
     * @return
     */
    @Transactional
    UserDTO updateUser(UserDTO dto, boolean updateNullValueField);
    
    /**
     * 
     * @param channelId
     * @param username
     * @param limit
     * @param offset
     * @return
     */
    Page<UserDTO> listNonMembers(String channelId, String username, int limit, int offset);
    
    /**
     * 批量下线用户
     * @param userIds
     * @return
     */
    @Transactional
    int batchOffline(Set<String> userIds);
    
    /**
     * 修改用户口令
     * @param userId
     * @param username
     * @param oldPassword
     * @param newPassword
     * @return
     */
    @Transactional
    int updatePassword(String userId, String username, String oldPassword, String newPassword);

}


================================================
FILE: leo-im-api/src/test/java/org/leo/im/api/AppTest.java
================================================
package org.leo.im.api;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTest 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
}


================================================
FILE: leo-im-api/target/classes/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Built-By: Administrator
Class-Path: leo-im-common-1.0.jar slf4j-api-1.7.25.jar logback-classic
 -1.2.3.jar logback-core-1.2.3.jar
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
Main-Class: org.leo.im.starter.App



================================================
FILE: leo-im-api/target/classes/META-INF/maven/org.leo.im/leo-im-api/pom.properties
================================================
#Generated by Maven Integration for Eclipse
#Tue Jun 19 09:17:09 CST 2018
version=1.0
groupId=org.leo.im
m2e.projectName=leo-im-api
m2e.projectLocation=F\:\\Develop\\open-source\\leo-im-server\\leo-im-api
artifactId=leo-im-api


================================================
FILE: leo-im-api/target/classes/META-INF/maven/org.leo.im/leo-im-api/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-api</artifactId>
	<name>leo-im-api</name>
	<url>http://maven.apache.org</url>
	<dependencies>
        <dependency>
            <groupId>org.leo.im</groupId>
            <artifactId>leo-im-common</artifactId>
            <version>${parent.version}</version>
        </dependency>       
    </dependencies>	
</project>


================================================
FILE: leo-im-api/target/maven-archiver/pom.properties
================================================
#Generated by Maven
#Tue Jun 12 16:14:09 CST 2018
version=1.0
groupId=org.leo.im
artifactId=leo-im-api


================================================
FILE: leo-im-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
================================================


================================================
FILE: leo-im-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\service\UserChannelService.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\annotation\Cacheable.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\service\UnreadMessageCountService.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\service\UserService.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\FileDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\UserDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\annotation\Transactional.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\exception\ServiceException.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\service\MessageService.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\ChannelDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\ChannelListDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\ChannelMemberDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\MessageDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\dto\UserChannelDTO.java
F:\Develop\open-source\leo-im-server\leo-im-api\src\main\java\org\leo\im\api\service\ChannelService.java


================================================
FILE: leo-im-api/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
================================================


================================================
FILE: leo-im-api/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-api\src\test\java\org\leo\im\api\AppTest.java


================================================
FILE: leo-im-api/target/surefire-reports/TEST-org.leo.im.api.AppTest.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="org.leo.im.api.AppTest" time="0.002" errors="0" skipped="0">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="E:\Software\Java\jdk1.8.0_131\jre\bin"/>
    <property name="java.vm.version" value="25.131-b11"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="maven.multiModuleProjectDirectory" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="CN"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value=""/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.runtime.version" value="1.8.0_131-b11"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\ADMINI~1\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 10"/>
    <property name="classworlds.conf" value="E:\Eclipse_Workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf8379869101416676275.tmp"/>
    <property name="sun.jnu.encoding" value="GBK"/>
    <property name="java.library.path" value="E:\Software\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin/server;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin;E:/Software/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\Software\Java\jdk1.8.0_131\bin;F:\Software\python-3.6.1-embed-amd64;E:\Software\node-v6.11.1-win-x64;E:\Software\nodejs\;e:\Software\Git\cmd;E:\Software\go\bin;E:\Software\TortoiseGit\bin;e:\software\SSH Communications Security\SSH Secure Shell;E:\Software\Microsoft VS Code\bin;F:\Develop\nodejs\node_global;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;;C:\Users\Administrator\Desktop;;."/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="52.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="10.0"/>
    <property name="user.home" value="C:\Users\Administrator"/>
    <property name="user.timezone" value="Asia/Shanghai"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.8"/>
    <property name="file.encoding" value="GBK"/>
    <property name="user.name" value="Administrator"/>
    <property name="java.class.path" value="/C:/Users/Administrator/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.1.20161104-1803/jars/plexus-classworlds-2.5.2.jar"/>
    <property name="java.vm.specification.version" value="1.8"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="E:\Software\Java\jdk1.8.0_131\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs F:\Software\apache-maven-3.3.9\conf\settings.xml -s F:\Software\apache-maven-3.3.9\conf\settings.xml package"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="zh"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.8.0_131"/>
    <property name="java.ext.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="E:\Software\Java\jdk1.8.0_131\jre\lib\resources.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\rt.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jsse.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jce.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\charsets.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jfr.jar;E:\Software\Java\jdk1.8.0_131\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="F:\Develop\open-source\leo-im-server\EMBEDDED"/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase classname="org.leo.im.api.AppTest" name="testApp" time="0.002"/>
</testsuite>

================================================
FILE: leo-im-api/target/surefire-reports/org.leo.im.api.AppTest.txt
================================================
-------------------------------------------------------------------------------
Test set: org.leo.im.api.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.097 sec


================================================
FILE: leo-im-api-provider/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: leo-im-api-provider/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im-api-provider</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: leo-im-api-provider/.settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8


================================================
FILE: leo-im-api-provider/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: leo-im-api-provider/.settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: leo-im-api-provider/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-api-provider</artifactId>
	<name>leo-im-api-provider</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-service</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</project>


================================================
FILE: leo-im-api-provider/src/main/java/org/leo/im/api/provider/ServiceFactory.java
================================================
package org.leo.im.api.provider;

import org.leo.im.api.service.ChannelService;
import org.leo.im.api.service.MessageService;
import org.leo.im.api.service.UserChannelService;
import org.leo.im.api.service.UserService;
import org.leo.im.service.ChannelServiceImpl;
import org.leo.im.service.MessageServiceImpl;
import org.leo.im.service.UserChannelServiceImpl;
import org.leo.im.service.UserServiceImpl;

/**
 * 服务工厂类
 * 
 * @author Leo
 * @date 2018/3/30
 */
public final class ServiceFactory {

    /**
     * 创建用户服务的实例
     * 
     * @return
     */
    public static UserService createUserService() {
        return new UserServiceImpl();
    }
    
    /**
     * 创建频道服务的实例
     * @return
     */
    public static ChannelService createChannelService() {
        return new ChannelServiceImpl();
    }
    
    /**
     * 创建用户频道服务类的实例
     * @return
     */
    public static UserChannelService createUserChannelService() {
        return new UserChannelServiceImpl();
    }
    
    /**
     * 创建消息服务的实例
     * @return
     */
    public static MessageService createMessageService() {
        return new MessageServiceImpl();
    }

}


================================================
FILE: leo-im-api-provider/src/test/java/org/leo/im/api/provider/AppTest.java
================================================
package org.leo.im.api.provider;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTest 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
}


================================================
FILE: leo-im-api-provider/target/classes/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Built-By: Administrator
Class-Path: leo-im-api-1.0.jar leo-im-common-1.0.jar leo-im-service-1.
 0.jar leo-im-store-1.0.jar mysql-connector-java-8.0.11.jar protobuf-j
 ava-2.6.0.jar druid-1.1.9.jar leo-im-model-1.0.jar leo-im-util-1.0.ja
 r cglib-3.2.6.jar asm-6.0.jar ant-1.9.6.jar ant-launcher-1.9.6.jar jj
 wt-0.9.0.jar jackson-databind-2.8.9.jar jackson-annotations-2.8.0.jar
  jackson-core-2.8.9.jar leo-im-notification-1.0.jar jedis-2.9.0.jar c
 ommons-pool2-2.4.2.jar fastjson-1.2.47.jar slf4j-api-1.7.25.jar logba
 ck-classic-1.2.3.jar logback-core-1.2.3.jar
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
Main-Class: org.leo.im.starter.App



================================================
FILE: leo-im-api-provider/target/classes/META-INF/maven/org.leo.im/leo-im-api-provider/pom.properties
================================================
#Generated by Maven Integration for Eclipse
#Tue Jun 19 09:17:17 CST 2018
version=1.0
groupId=org.leo.im
m2e.projectName=leo-im-api-provider
m2e.projectLocation=F\:\\Develop\\open-source\\leo-im-server\\leo-im-api-provider
artifactId=leo-im-api-provider


================================================
FILE: leo-im-api-provider/target/classes/META-INF/maven/org.leo.im/leo-im-api-provider/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-api-provider</artifactId>
	<name>leo-im-api-provider</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-service</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</project>


================================================
FILE: leo-im-api-provider/target/maven-archiver/pom.properties
================================================
#Generated by Maven
#Tue Jun 12 16:14:18 CST 2018
version=1.0
groupId=org.leo.im
artifactId=leo-im-api-provider


================================================
FILE: leo-im-api-provider/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
================================================


================================================
FILE: leo-im-api-provider/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-api-provider\src\main\java\org\leo\im\api\provider\ServiceFactory.java


================================================
FILE: leo-im-api-provider/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
================================================


================================================
FILE: leo-im-api-provider/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-api-provider\src\test\java\org\leo\im\api\provider\AppTest.java


================================================
FILE: leo-im-api-provider/target/surefire-reports/TEST-org.leo.im.api.provider.AppTest.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="org.leo.im.api.provider.AppTest" time="0.001" errors="0" skipped="0">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="E:\Software\Java\jdk1.8.0_131\jre\bin"/>
    <property name="java.vm.version" value="25.131-b11"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="maven.multiModuleProjectDirectory" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="CN"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value=""/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.runtime.version" value="1.8.0_131-b11"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\ADMINI~1\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 10"/>
    <property name="classworlds.conf" value="E:\Eclipse_Workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf8379869101416676275.tmp"/>
    <property name="sun.jnu.encoding" value="GBK"/>
    <property name="java.library.path" value="E:\Software\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin/server;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin;E:/Software/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\Software\Java\jdk1.8.0_131\bin;F:\Software\python-3.6.1-embed-amd64;E:\Software\node-v6.11.1-win-x64;E:\Software\nodejs\;e:\Software\Git\cmd;E:\Software\go\bin;E:\Software\TortoiseGit\bin;e:\software\SSH Communications Security\SSH Secure Shell;E:\Software\Microsoft VS Code\bin;F:\Develop\nodejs\node_global;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;;C:\Users\Administrator\Desktop;;."/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="52.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="10.0"/>
    <property name="user.home" value="C:\Users\Administrator"/>
    <property name="user.timezone" value="Asia/Shanghai"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.8"/>
    <property name="file.encoding" value="GBK"/>
    <property name="user.name" value="Administrator"/>
    <property name="java.class.path" value="/C:/Users/Administrator/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.1.20161104-1803/jars/plexus-classworlds-2.5.2.jar"/>
    <property name="java.vm.specification.version" value="1.8"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="E:\Software\Java\jdk1.8.0_131\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs F:\Software\apache-maven-3.3.9\conf\settings.xml -s F:\Software\apache-maven-3.3.9\conf\settings.xml package"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="zh"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.8.0_131"/>
    <property name="java.ext.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="E:\Software\Java\jdk1.8.0_131\jre\lib\resources.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\rt.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jsse.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jce.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\charsets.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jfr.jar;E:\Software\Java\jdk1.8.0_131\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="F:\Develop\open-source\leo-im-server\EMBEDDED"/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase classname="org.leo.im.api.provider.AppTest" name="testApp" time="0.001"/>
</testsuite>

================================================
FILE: leo-im-api-provider/target/surefire-reports/org.leo.im.api.provider.AppTest.txt
================================================
-------------------------------------------------------------------------------
Test set: org.leo.im.api.provider.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec


================================================
FILE: leo-im-common/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: leo-im-common/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im-common</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: leo-im-common/.settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8


================================================
FILE: leo-im-common/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: leo-im-common/.settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: leo-im-common/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-common</artifactId>
	<name>leo-im-common</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
</project>


================================================
FILE: leo-im-common/src/main/java/org/leo/im/common/data/Page.java
================================================
package org.leo.im.common.data;

import java.util.List;

/**
 * 分页查询结果类
 * 
 * @author Leo
 * @date 2018/4/8
 * @param <T>
 */
public final class Page<T> implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    private long total;

    private List<T> rows;

    public Page(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public long getTotal() {
        return this.total;
    }

    public List<T> getRows() {
        return this.rows;
    }

}


================================================
FILE: leo-im-common/src/test/java/org/leo/im/common/AppTest.java
================================================
package org.leo.im.common;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTest 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
}


================================================
FILE: leo-im-common/target/classes/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Built-By: Administrator
Class-Path: slf4j-api-1.7.25.jar logback-classic-1.2.3.jar logback-cor
 e-1.2.3.jar
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
Main-Class: org.leo.im.starter.App



================================================
FILE: leo-im-common/target/classes/META-INF/maven/org.leo.im/leo-im-common/pom.properties
================================================
#Generated by Maven Integration for Eclipse
#Tue Jun 19 09:17:08 CST 2018
version=1.0
groupId=org.leo.im
m2e.projectName=leo-im-common
m2e.projectLocation=F\:\\Develop\\open-source\\leo-im-server\\leo-im-common
artifactId=leo-im-common


================================================
FILE: leo-im-common/target/classes/META-INF/maven/org.leo.im/leo-im-common/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-common</artifactId>
	<name>leo-im-common</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
</project>


================================================
FILE: leo-im-common/target/maven-archiver/pom.properties
================================================
#Generated by Maven
#Tue Jun 12 16:14:08 CST 2018
version=1.0
groupId=org.leo.im
artifactId=leo-im-common


================================================
FILE: leo-im-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
================================================


================================================
FILE: leo-im-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-common\src\main\java\org\leo\im\common\data\Page.java


================================================
FILE: leo-im-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
================================================


================================================
FILE: leo-im-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-common\src\test\java\org\leo\im\common\AppTest.java


================================================
FILE: leo-im-common/target/surefire-reports/TEST-org.leo.im.common.AppTest.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="org.leo.im.common.AppTest" time="0.007" errors="0" skipped="0">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="E:\Software\Java\jdk1.8.0_131\jre\bin"/>
    <property name="java.vm.version" value="25.131-b11"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="maven.multiModuleProjectDirectory" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="CN"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value=""/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.runtime.version" value="1.8.0_131-b11"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\ADMINI~1\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 10"/>
    <property name="classworlds.conf" value="E:\Eclipse_Workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf8379869101416676275.tmp"/>
    <property name="sun.jnu.encoding" value="GBK"/>
    <property name="java.library.path" value="E:\Software\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin/server;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin;E:/Software/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\Software\Java\jdk1.8.0_131\bin;F:\Software\python-3.6.1-embed-amd64;E:\Software\node-v6.11.1-win-x64;E:\Software\nodejs\;e:\Software\Git\cmd;E:\Software\go\bin;E:\Software\TortoiseGit\bin;e:\software\SSH Communications Security\SSH Secure Shell;E:\Software\Microsoft VS Code\bin;F:\Develop\nodejs\node_global;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;;C:\Users\Administrator\Desktop;;."/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="52.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="10.0"/>
    <property name="user.home" value="C:\Users\Administrator"/>
    <property name="user.timezone" value="Asia/Shanghai"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.8"/>
    <property name="file.encoding" value="GBK"/>
    <property name="user.name" value="Administrator"/>
    <property name="java.class.path" value="/C:/Users/Administrator/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.1.20161104-1803/jars/plexus-classworlds-2.5.2.jar"/>
    <property name="java.vm.specification.version" value="1.8"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="E:\Software\Java\jdk1.8.0_131\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs F:\Software\apache-maven-3.3.9\conf\settings.xml -s F:\Software\apache-maven-3.3.9\conf\settings.xml package"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="zh"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.8.0_131"/>
    <property name="java.ext.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="E:\Software\Java\jdk1.8.0_131\jre\lib\resources.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\rt.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jsse.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jce.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\charsets.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jfr.jar;E:\Software\Java\jdk1.8.0_131\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="F:\Develop\open-source\leo-im-server\EMBEDDED"/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase classname="org.leo.im.common.AppTest" name="testApp" time="0.007"/>
</testsuite>

================================================
FILE: leo-im-common/target/surefire-reports/org.leo.im.common.AppTest.txt
================================================
-------------------------------------------------------------------------------
Test set: org.leo.im.common.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.084 sec


================================================
FILE: leo-im-http/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: leo-im-http/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im-http</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: leo-im-http/.settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8


================================================
FILE: leo-im-http/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: leo-im-http/.settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: leo-im-http/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-http</artifactId>
	<name>leo-im-http</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
			<version>6.1</version>
		</dependency>
		<dependency>
			<groupId>net.coobird</groupId>
			<artifactId>thumbnailator</artifactId>
			<version>0.4.8</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-all</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>${fastjson.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo</groupId>
			<artifactId>netty-rest-server</artifactId>
			<version>1.0</version>
			<!-- 
			<scope>system</scope>
			<systemPath>${project.basedir}/lib/netty-rest-server-1.0.jar</systemPath>
			 -->
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api</artifactId>
			<version>${parent.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api-provider</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-util</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-notification</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-common</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</project>


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/HttpServer.java
================================================
package org.leo.im.http;

import org.leo.im.http.controller.ExceptionController;
import org.leo.im.http.interceptor.AuthenticationInterceptor;
import org.leo.im.http.interceptor.CorsInterceptor;
import org.leo.web.core.WebServer;

/**
 * Leo IM REST API Server
 * 
 * @author Leo
 * @date 2018/4/2
 */
public final class HttpServer {
    
    /**
     * 启动api server
     * @throws InterruptedException 
     */
    public void start() throws InterruptedException {
        // 忽略指定url
        WebServer.getIgnoreUrls().add("/favicon.ico");
        
        // 全局异常处理
        WebServer.setExceptionHandler(new ExceptionController());
        
        // 设置监听端口号
        WebServer server = new WebServer(Integer.getInteger("http.port"));
        
        // 设置boss与worker线程数
        server.setBossThreads(Integer.getInteger("http.boss.threads"));
        server.setWorkerThreads(Integer.getInteger("http.worker.threads"));
        
        // 设置Http最大内容长度(默认 为10M)
        server.setMaxContentLength(1024 * 1024 * Integer.getInteger("http.max.content.length"));
        
        // 设置Controller所在包
        server.setControllerBasePackage("org.leo.im.http.controller");
        
        // 添加拦截器,按照添加的顺序执行。
        // 跨域拦截器
        server.addInterceptor(new CorsInterceptor());
        // 身份认证拦截器,设置例外url
        server.addInterceptor(new AuthenticationInterceptor(), "/auth/login", "/auth/verificationCode", 
                "/users", "/messages/files");
        
        server.start();
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/cache/Cache.java
================================================
package org.leo.im.http.cache;

/**
 * 缓存
 * 
 * @author Leo
 * @date 2018/4/1
 */
final class Cache {
    
    private Object value;
    
    /**
     * 缓存的生存时间,单位:秒
     */
    private int timeout;
    
    private long expireAt;
    
    public Cache(Object value) {
        this.value = value;
    }
    
    public Cache(Object value, int timeout) {
        this.value = value;
        this.timeout = timeout;
        this.expireAt = System.currentTimeMillis() + this.timeout * 1000;
    }
    
    public Object getValue() {
        return this.value;
    }
    public void setValue(Object value) {
        this.value = value;
    }
    
    public int getTimeout() {
        return this.timeout;
    }
    public void setTimeout(int timeout) {
        this.timeout = timeout;
        this.expireAt = System.currentTimeMillis() + this.timeout * 1000;
    }
    
    public long getExpireAt() {
        return this.expireAt;
    }
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/cache/CacheManager.java
================================================
package org.leo.im.http.cache;

/**
 * 缓存管理接口
 * 
 * @author Leo
 * @date 2018/3/27
 */
public interface CacheManager {
    
    /**
     * 得到缓存
     * @param key
     * @return
     */
    Object get(String key);

    /**
     * 设置缓存
     * @param key
     * @param value
     */
    void put(String key, Object value);
    
    /**
     * 设置缓存
     * @param key
     * @param value
     * @param timeout 生存时间,单位为秒。
     */
    void put(String key, Object value, int timeout);
    
    /**
     * 删除缓存
     * @param key
     */
    void remove(String key);
    
    /**
     * 清除缓存
     */
    void clear();
    
    /**
     * 清理超时缓存
     */
    void clearExpired();
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/cache/CacheManagerFactory.java
================================================
package org.leo.im.http.cache;

/**
 * 缓存管理器工厂类
 * 
 * @author Leo
 * @date 2018/3/27
 */
public final class CacheManagerFactory {

    /**
     * 得到缓存管理器的实例
     * 
     * @return
     */
    public static CacheManager getCacheManager() {
        String cacheType = System.getProperty("cache.type") == null ? "map"
                : System.getProperty("cache.type").toLowerCase();
        switch (cacheType) {
        case "map":
            return MapCacheManager.getInstance();
        default:
            return MapCacheManager.getInstance();
        }
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/cache/MapCacheManager.java
================================================
package org.leo.im.http.cache;

import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 基于Java Map的缓存管理器
 * 
 * @author Leo
 * @date 2018/3/27
 */
final class MapCacheManager implements CacheManager {

    private final static int CLEAR_INTERVAL = 10;

    private Map<String, Cache> caches = new ConcurrentHashMap<>(64);

    private MapCacheManager() {

    }
    
    public static class InstanceHolder {
        private static MapCacheManager instance = new MapCacheManager();
        static {
            instance.clearExpired();
        }
    }
    
    public static MapCacheManager getInstance() {
        return InstanceHolder.instance;
    }
    
    /**
     * 得到缓存
     * @param key
     * @return
     */
    @Override
    public Object get(String key) {
        Cache cache = caches.get(key);
        return cache == null ? null : cache.getValue();
    }

    /**
     * 添加缓存
     * 
     * @param key
     * @param value
     */
    @Override
    public void put(String key, Object value) {
        Cache cache = new Cache(value);
        caches.put(key, cache);
    }

    /**
     * 添加缓存
     * 
     * @param key
     * @param value
     * @param timeout
     *            生存时间,单位为秒。
     */
    @Override
    public void put(String key, Object value, int timeout) {
        Cache cache = new Cache(value, timeout);
        caches.put(key, cache);
    }

    /**
     * 删除缓存
     * 
     * @param key
     */
    @Override
    public void remove(String key) {
        this.caches.remove(key);
    }

    /**
     * 清除缓存
     */
    @Override
    public void clear() {
        this.caches.clear();
    }

    /**
     * 清理超时缓存
     */
    @Override
    public void clearExpired() {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {

            @Override
            public void run() {
                Set<Entry<String, Cache>> entrySet = caches.entrySet();
                long currentTime = System.currentTimeMillis();
                for (Entry<String, Cache> entry : entrySet) {
                    if (entry.getValue().getExpireAt() > 0 && currentTime >= entry.getValue().getExpireAt()) {
                        caches.remove(entry.getKey());
                    }
                }
            }

        }, 1 * 1000, CLEAR_INTERVAL * 1000);
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/constant/CacheKeys.java
================================================
package org.leo.im.http.constant;

/**
 * 缓存key常量类
 * 
 * @author Leo
 * @date 2018/4/1
 */
public final class CacheKeys {

    /**
     * JSession key前缀
     */
    public static final String JSESSIONID = "JSESSIONID";
    
    /**
     * 验证码缓存key前缀
     */
    public static final String VERIFICATION_CODE_PREFIX = "v-code-"; 
    
    /**
     * 登录失败次数缓存前缀
     */
    public static final String LOGIN_FAILURE_COUNT = "login-failure-count_";
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/AuthController.java
================================================
package org.leo.im.http.controller;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import org.leo.im.api.service.UserService;
import org.leo.im.api.dto.UserDTO;
import org.leo.im.api.provider.ServiceFactory;
import org.leo.im.http.cache.CacheManagerFactory;
import org.leo.im.http.constant.CacheKeys;
import org.leo.im.http.util.JwtUtils;
import org.leo.im.service.support.ServiceProxy;
import org.leo.web.annotation.GetMapping;
import org.leo.web.annotation.PostMapping;
import org.leo.web.annotation.RequestMapping;
import org.leo.web.annotation.RestController;
import org.leo.web.annotation.UrlEncodedForm;
import org.leo.web.rest.HttpResponse;
import org.leo.web.rest.HttpStatus;
import org.leo.web.rest.ResponseEntity;

import com.alibaba.fastjson.JSONObject;

import io.netty.handler.codec.http.cookie.ServerCookieDecoder;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.cookie.Cookie;

/**
 * 认证控制器
 * 
 * @author Leo
 * @date 2018/4/4
 */
@RestController
@RequestMapping("/auth")
public final class AuthController extends BaseController {
    
    /**
     * Session超时时间,单位:秒。
     */
    private static final int SESSION_TIMEOUT = 5 * 60;
    
    /**
     * 验证码超时时间,默认为120秒。
     */
    private static final int VERIFICATION_CODE_TIMEOUT = 2 * 60;
    
    /**
     * 登录重试次数
     */
    private static final int LOGIN_RETRY_COUNT = 5;
    
    /**
     * 登录失败次数缓存超时时间,单位:秒
     */
    private static final int LOGIN_FAILURE_COUNT_TIMEOUT = 5 * 60;

    @PostMapping("/login")
    public ResponseEntity<?> login(FullHttpRequest request, HttpResponse response, @UrlEncodedForm Map<String, String> form) {
        String sessionId = getJSessionId(request);
        if(sessionId == null) {
            // Session不存在
            sessionId = UUID.randomUUID().toString().replaceAll("-", "");
            response.getCookies().put(CacheKeys.JSESSIONID, sessionId);
        }
        CacheManagerFactory.getCacheManager().put(sessionId, (byte)0, SESSION_TIMEOUT);
        
        // 检查登录失败次数
        Object loginFailureCount = CacheManagerFactory.getCacheManager().get(CacheKeys.LOGIN_FAILURE_COUNT + sessionId);
        if(loginFailureCount != null) {
            if((int)loginFailureCount >= LOGIN_RETRY_COUNT) {
                return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build("登录失败次数过多,请稍后重试");
            }
        }
        
        // 检查验证码
        /*String verificationCode = form.get("verificationCode");
        if(verificationCode == null || verificationCode.trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("验证码为空");
        }
        if(sessionId == null || sessionId.trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的请求");
        }
        Object verificationCodeInCache = CacheManagerFactory.getCacheManager().get(CacheKeys.VERIFICATION_CODE_PREFIX + sessionId);
        if(verificationCodeInCache == null || verificationCodeInCache.toString().trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的验证码");
        }
        if(!verificationCode.equals(verificationCodeInCache)) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的验证码");
        }*/
        
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        UserDTO dto = serviceProxy.verifyLogin(form.get("username"), form.get("password"));        
        if (dto == null) {
            int userLoginFailureCount = (loginFailureCount == null ? 0 : (int)loginFailureCount);
            CacheManagerFactory.getCacheManager().put(CacheKeys.LOGIN_FAILURE_COUNT + sessionId, ++userLoginFailureCount, LOGIN_FAILURE_COUNT_TIMEOUT);
            return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build(); 
        }
        
        JSONObject json = new JSONObject();
        json.put("userId", dto.getId());
        String jwt = JwtUtils.createJWT(json.toJSONString(), System.getProperty("jwt.secret"), Long.getLong("jwt.ttl.millis"));
        Map<String, String> result = new HashMap<>();
        result.put("userId", dto.getId());
        result.put("username", dto.getName());
        result.put("nickname", dto.getNickname());
        result.put("firstLetterOfName", dto.getFirstLetterOfName());
        result.put("avatarUrl", dto.getAvatarUrl());
        result.put("token", jwt);
        
        // 删除缓存中的验证码
        // CacheManagerFactory.getCacheManager().remove(CacheKeys.VERIFICATION_CODE_PREFIX + sessionId);
        // 删除登录失败次数缓存
        CacheManagerFactory.getCacheManager().remove(CacheKeys.LOGIN_FAILURE_COUNT + sessionId);
        return ResponseEntity.ok(result);
    }

    @GetMapping("/verificationCode")
    public ResponseEntity<String> getVerificationCode(FullHttpRequest request, HttpResponse response) {
        String verificationCode = UUID.randomUUID().toString().substring(0, 4);
        String sessionId = null;
        if((sessionId = getJSessionId(request)) == null) {
            // Session不存在
            sessionId = UUID.randomUUID().toString().replaceAll("-", "");
            response.getCookies().put(CacheKeys.JSESSIONID, sessionId);
        }
        CacheManagerFactory.getCacheManager().put(sessionId, (byte)0, SESSION_TIMEOUT);
        CacheManagerFactory.getCacheManager().put(CacheKeys.VERIFICATION_CODE_PREFIX + sessionId, verificationCode, VERIFICATION_CODE_TIMEOUT);
        return ResponseEntity.ok(verificationCode);
    }

    /**
     * 从cookie中得到Session Id
     * @param request
     * @return
     */
    private String getJSessionId(FullHttpRequest request) {
        try {
            String cookieStr = request.headers().get("Cookie");
            if(cookieStr == null || cookieStr.trim().isEmpty()) {
                return null;
            }
            Set<Cookie> cookies = ServerCookieDecoder.STRICT.decode(cookieStr);
            Iterator<Cookie> it = cookies.iterator();

            while (it.hasNext()) {
                Cookie cookie = it.next();
                if (cookie.name().equals(CacheKeys.JSESSIONID)) {
                    if (CacheManagerFactory.getCacheManager().get(cookie.value()) != null) {
                        return cookie.value();
                    }
                }
            }
        } catch (Exception e1) {
            return null;
        }
        return null;
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/BaseController.java
================================================
package org.leo.im.http.controller;

import org.leo.im.http.util.JwtUtils;

import com.alibaba.fastjson.JSONObject;

import io.jsonwebtoken.Claims;

/**
 * 控制器基类
 * 
 * @author Leo
 * @date 2018/3/26
 */
public class BaseController {
    
    /**
     * 从jwt中获取subject信息
     * @param jwtUtils
     * @param jwt
     * @param key
     * @return
     */
    protected String getSubjectFromJwt(String jwt, String key) {
        Claims claims = JwtUtils.parseJWT(jwt, System.getProperty("jwt.secret"));
        String subject = claims.getSubject();
        if(key != null && !key.trim().equals("")) {
            JSONObject json = JSONObject.parseObject(subject);
            return json.getString(key);
        } else {
            return subject;
        }
    }
    
    /**
     * 验证jwt
     * @param jwt
     * @return
     */
    protected boolean verifyJwt(String jwt) {
        try {
            JwtUtils.parseJWT(jwt, System.getProperty("jwt.secret"));
            return true;
        } catch(Exception e) {
            return false;
        }
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/ChannelController.java
================================================
package org.leo.im.http.controller;

import org.leo.im.api.dto.ChannelDTO;
import org.leo.im.api.dto.ChannelMemberDTO;
import org.leo.im.api.provider.ServiceFactory;
import org.leo.im.api.service.ChannelService;
import org.leo.im.common.data.Page;
import org.leo.im.http.vo.ChannelVO;
import org.leo.im.http.vo.UserChannelVO;
import org.leo.im.service.support.ServiceProxy;
import org.leo.im.util.BeanUtils;
import org.leo.web.annotation.DeleteMapping;
import org.leo.web.annotation.GetMapping;
import org.leo.web.annotation.PatchMapping;
import org.leo.web.annotation.PathVariable;
import org.leo.web.annotation.PostMapping;
import org.leo.web.annotation.PutMapping;
import org.leo.web.annotation.RequestBody;
import org.leo.web.annotation.RequestHeader;
import org.leo.web.annotation.RequestMapping;
import org.leo.web.annotation.RequestParam;
import org.leo.web.annotation.RestController;
import org.leo.web.rest.ResponseEntity;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 频道控制器
 * 
 * @author Leo
 * @date 2018/4/3
 */
@RestController
@RequestMapping("/channels")
public final class ChannelController extends BaseController {

    @PostMapping("")
    public ResponseEntity<UserChannelVO> createChannel(FullHttpRequest request, @RequestHeader("X-Token") String token,
            @RequestBody String body) {
        String userId = this.getSubjectFromJwt(token, "userId");
        ChannelDTO dto = new ChannelDTO();
        JSONObject json = JSONObject.parseObject(body);
        dto.setType(json.getString("type"));
        if ("G".equals(dto.getType())) {
            dto.setName(json.getString("name"));
            dto.setPurpose(json.getString("purpose"));
            JSONArray members = json.getJSONArray("members");
            dto.setMemberCount(members.size());
            for(int i = 0; i < members.size(); i++) {
                ChannelMemberDTO member = new ChannelMemberDTO();
                JSONObject memberJson = members.getJSONObject(i);
                member.setId(memberJson.getString("id"));
                member.setNickname(memberJson.getString("nickname"));
                member.setAdmin(memberJson.getString("id").equals(userId));
                dto.getMembers().add(member);
            }
        } 
        if ("P".equals(dto.getType())) {
            dto.setFromUserId(userId);
            dto.setFromUsername(json.getString("fromUsername"));
            dto.setFromUserNickname(json.getString("fromUserNickname"));
            dto.setToUserId(json.getString("toUserId"));
            dto.setToUsername(json.getString("toUsername"));
            dto.setToUserNickname(json.getString("toUserNickname"));
            dto.setName(dto.getToUserNickname() != null && !dto.getToUserNickname().trim().isEmpty() ? 
                    dto.getToUserNickname() : dto.getToUsername());
            dto.setMemberCount(2);
            ChannelMemberDTO member1 = new ChannelMemberDTO();
            member1.setId(userId);
            member1.setAdmin(true);
            dto.getMembers().add(member1);
            ChannelMemberDTO member2 = new ChannelMemberDTO();
            member2.setId(dto.getToUserId());
            dto.getMembers().add(member2);
        }
        dto.setCreatorId(userId);
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        ChannelDTO returnDTO = serviceProxy.saveChannel(dto, json.getString("creatorNickname"));
        UserChannelVO vo = new UserChannelVO();
        BeanUtils.copyProperties(returnDTO, vo);
        vo.setChannelId(returnDTO.getId());
        vo.setChannelName(returnDTO.getName());
        vo.setChannelDisplayName(getChannelDisplayName(returnDTO, userId));
        vo.setChannelType(returnDTO.getType());
        return ResponseEntity.created(vo);
    }
    
    @GetMapping("/{id}")
    public ResponseEntity<ChannelVO> getById(@PathVariable("id") String id) {
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        ChannelDTO dto = serviceProxy.getById(id);
        if(dto == null) {
            return ResponseEntity.notFound().build();
        }
        ChannelVO vo = new ChannelVO();
        BeanUtils.copyProperties(dto, vo);
        return ResponseEntity.ok(vo);
    }
    
    
    @GetMapping("/{channelId}/isAdmin")
    public ResponseEntity<Boolean> isAdmin(@PathVariable("channelId") String channelId, @RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        boolean isAdmin = serviceProxy.isAdmin(userId, channelId);
        return ResponseEntity.ok(isAdmin);
    }
    
    @PatchMapping("/{channelId}")
    public ResponseEntity<?> updateChannel(@PathVariable("channelId") String channelId, @RequestBody String body) {
        JSONObject json = JSONObject.parseObject(body);
        ChannelService serviceProxy = null;
        if(json.containsKey("name")) {
            serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
            int count = serviceProxy.updateName(channelId, json.getString("name"));
            return ResponseEntity.ok(count);
        }
        if(json.containsKey("purpose")) {
            serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
            int count = serviceProxy.updatePurpose(channelId, json.getString("purpose"));
            return ResponseEntity.ok(count);
        }
        return ResponseEntity.internalServerError("not found allowed filed in body");
    }
    
    @GetMapping("/{channelId}/members")
    public ResponseEntity<Page<ChannelMemberDTO>> listMember(@PathVariable("channelId") String channelId, 
            @RequestParam("username") String username, @RequestParam("limit") int limit, @RequestParam("offset") int offset) {
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        Page<ChannelMemberDTO> result = serviceProxy.listMember(channelId, username, limit, offset);
        return ResponseEntity.ok(result);
    }
    
    @PostMapping("/{channelId}/members")
    public ResponseEntity<Integer> addMember(@PathVariable("channelId") String channelId, @RequestBody String body) {
        JSONObject data = JSONObject.parseObject(body);
        JSONArray jsonArray = data.getJSONArray("users");
        String[] userIds = new String[jsonArray.size()];
        String[] userNicknames = new String[jsonArray.size()];
        for(int i = 0; i < userIds.length; i++) {
            userIds[i] = jsonArray.getJSONObject(i).getString("id");
            userNicknames[i] = jsonArray.getJSONObject(i).getString("nickname");
        }
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        int count = serviceProxy.addMember(channelId, userIds, userNicknames, data.getString("admin"));
        return ResponseEntity.created(count);
    }
    
    @DeleteMapping("/{channelId}/members")
    public ResponseEntity<Integer> removeMember(@PathVariable("channelId") String channelId, @RequestBody String body) {
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        JSONObject data = JSONObject.parseObject(body);
        int count = serviceProxy.removeMember(channelId, data.getString("memberId"), data.getString("memberNickname"),
                data.getString("admin"));
        if(count > 0) {
            return ResponseEntity.noContent(count);
        }
        return ResponseEntity.notFound().build();
    }
    
    @PutMapping("/{channelId}/admin")
    public ResponseEntity<Integer> changeAdmin(@PathVariable("channelId") String channelId, @RequestBody String body) {
        JSONObject json = JSONObject.parseObject(body);
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        int count = serviceProxy.changeAdmin(channelId, json.getString("memberId"), json.getBooleanValue("isAdmin"));
        return ResponseEntity.created(count);
    }
    
    /**
     * 离开频道
     * @param channelId
     * @param body
     * @return
     */
    @DeleteMapping("/{channelId}/members/{memberId}")
    public ResponseEntity<Integer> leaveChannel(@PathVariable("channelId") String channelId, @PathVariable("memberId") String memberId,
            @RequestBody String body) {
        JSONObject data = JSONObject.parseObject(body);
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        int count = serviceProxy.leaveChannel(channelId, memberId, data.getString("memberNickname"));
        return ResponseEntity.noContent(count);
    }
    
    @DeleteMapping("/{channelId}")
    public ResponseEntity<Integer> removeChannel(@PathVariable("channelId") String channelId, @RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        ChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createChannelService());
        int count = serviceProxy.removeChannel(channelId, userId);
        return ResponseEntity.noContent(count);
    }
    
    /**
     * 得到频道的显示名称
     * @param dto
     * @param creatorId
     * @return
     */
    private String getChannelDisplayName(ChannelDTO dto, String creatorId) {
        if(dto.getType().equals("G")) {
            return dto.getName();
        }
        if(dto.getCreatorId().equals(creatorId)) {
            return dto.getToUserNickname();
        }
        return dto.getFromUserNickname();
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/ExceptionController.java
================================================
package org.leo.im.http.controller;

import org.leo.web.exception.ResourceNotFoundException;
import org.leo.web.rest.HttpContextHolder;
import org.leo.web.rest.HttpResponse;
import org.leo.web.rest.HttpStatus;
import org.leo.web.rest.controller.ExceptionHandler;

/**
 * 异常处理器
 * 
 * @author Leo
 * @date 2018/3/30
 */
public class ExceptionController implements ExceptionHandler {

    /**
     * 处理异常
     * 
     * @param e
     */
    @Override
    public void doHandle(Exception e) {
        HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
        if (e instanceof ResourceNotFoundException) {
            status = HttpStatus.NOT_FOUND;
        }
        String errorMessage = e.getCause() == null ? "" : e.getCause().getMessage();
        if (errorMessage == null) {
            errorMessage = e.getMessage();
        }
        HttpResponse response = HttpContextHolder.getResponse();
        response.write(status, errorMessage);
        response.closeChannel();
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/MessageController.java
================================================
package org.leo.im.http.controller;

import java.io.RandomAccessFile;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import org.leo.im.api.dto.FileDTO;
import org.leo.im.api.dto.MessageDTO;
import org.leo.im.api.provider.ServiceFactory;
import org.leo.im.api.service.MessageService;
import org.leo.im.http.file.FileStorage;
import org.leo.im.http.file.FileStorageFactory;
import org.leo.im.http.vo.MessageVO;
import org.leo.im.service.support.ServiceProxy;
import org.leo.im.util.BeanUtils;
import org.leo.web.annotation.DeleteMapping;
import org.leo.web.annotation.GetMapping;
import org.leo.web.annotation.PostMapping;
import org.leo.web.annotation.RequestBody;
import org.leo.web.annotation.RequestHeader;
import org.leo.web.annotation.RequestMapping;
import org.leo.web.annotation.RequestParam;
import org.leo.web.annotation.RestController;
import org.leo.web.annotation.UploadFile;
import org.leo.web.annotation.UrlEncodedForm;
import org.leo.web.multipart.MultipartFile;
import org.leo.web.rest.ResponseEntity;

import com.alibaba.fastjson.JSONObject;

import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 消息控制器
 * 
 * @author Leo
 * @date 2018/5/16
 */
@RestController()
@RequestMapping("/messages")
public final class MessageController extends BaseController {

    @GetMapping("")
    public ResponseEntity<List<MessageVO>> listMessage(@RequestParam("channelId") String channelId,
            @RequestParam("maxCreateAt") long maxCreateAt, @RequestParam("limit") int limit) {
        MessageService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createMessageService());
        List<MessageDTO> dtoList = serviceProxy.listMessage(channelId, maxCreateAt, limit);
        List<MessageVO> voList = new ArrayList<>(dtoList.size());
        for(MessageDTO dto : dtoList) {
            MessageVO vo = new MessageVO();
            BeanUtils.copyProperties(dto, vo);
            voList.add(vo);
        }
        return ResponseEntity.ok(voList);
    }
    
    @PostMapping("")
    public ResponseEntity<?> saveMessage(FullHttpRequest request, @RequestHeader("X-Token") String token,
            @RequestBody String body) {
        String userId = this.getSubjectFromJwt(token, "userId");
        JSONObject json = JSONObject.parseObject(body);
        MessageDTO dto = new MessageDTO();
        dto.setSenderId(userId);
        if(json.containsKey("type")) {
            dto.setType(json.getString("type"));
        }
        dto.setChannelId(json.getString("channelId"));
        dto.setContent(json.getString("content"));
        dto.setCreateAt(new Date().getTime());
        MessageService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createMessageService());
        MessageDTO returnDTO = serviceProxy.saveMessage(dto);
        if(returnDTO != null) {
            MessageVO vo = new MessageVO();
            BeanUtils.copyProperties(returnDTO, vo);
            return ResponseEntity.created(vo);
        }
        return ResponseEntity.notFound().build();
    }
    
    @PostMapping("/read")
    public ResponseEntity<?> readMessage(@RequestHeader("X-Token") String token, @RequestBody String body) {
        String userId = this.getSubjectFromJwt(token, "userId");
        JSONObject json = JSONObject.parseObject(body);
        MessageService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createMessageService());
        int count = serviceProxy.readMessage(json.getString("channelId"), userId, json.getShortValue("total"));
        return ResponseEntity.created(count);
    }
    
    @DeleteMapping("")
    public ResponseEntity<?> removeMessage(@RequestHeader("X-Token") String token, @RequestBody String body) {
        String userId = this.getSubjectFromJwt(token, "userId");
        MessageService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createMessageService());
        JSONObject json = JSONObject.parseObject(body);
        int count = serviceProxy.removeMessage(json.getLongValue("messageId"), userId, json.getString("channelId"),
                json.getString("toUserId"));
        if(count == 1) {
            return ResponseEntity.noContent(count);
        }
        return ResponseEntity.notFound().build();
    }
    
    @PostMapping("/files")
    public ResponseEntity<?> uploadFile(@UploadFile MultipartFile file, @RequestHeader("X-Token") String token,
            @UrlEncodedForm Map<String, String> form) {
        String userId = this.getSubjectFromJwt(token, "userId");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        String fileKey = sdf.format(new Date()) + "/" + UUID.randomUUID().toString().replace("-", "");
        
        // 保存文件
        FileStorage fs = FileStorageFactory.newInstance();
        fs.save(fileKey, file.getFileName(), file.getFileData());
        
        int width = Integer.parseInt(form.get("imageWidth"));
        int height = Integer.parseInt(form.get("imageHeight"));
        short thumbWidth = getThumbWidth(width);
        short thumbHeight = getThumbHeight(height);
        short[] realThumbSize = new short[] { 0, 0 };
        // 如果是图片,保存略缩图
        if(this.isImage(file.getFileType())) {
            realThumbSize = fs.saveThumb(fileKey + "/thumb", file.getFileName(), file.getFileData(), thumbWidth, thumbHeight);
        }
        
        // 保存文件信息到数据库
        MessageService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createMessageService());
        FileDTO fileDTO = new FileDTO();
        fileDTO.setName(file.getFileName());
        fileDTO.setExtension(getFileExtension(file.getFileName()));
        fileDTO.setSize(Integer.parseInt(form.get("size")));
        fileDTO.setMimeType(file.getFileType());
        fileDTO.setWidth(width);
        fileDTO.setHeight(height);
        fileDTO.setThumbWidth(realThumbSize[0]);
        fileDTO.setThumbHeight(realThumbSize[1]);
        fileDTO.setPath(fileKey);
        String fileId = serviceProxy.saveFile(fileDTO);
        
        // 保存消息
        MessageDTO messageDTO = new MessageDTO();
        messageDTO.setSenderId(userId);
        messageDTO.setChannelId(form.get("channelId"));
        messageDTO.setCreateAt(new Date().getTime());
        messageDTO.setFileId(fileId);
        MessageDTO returnDTO = serviceProxy.saveMessage(messageDTO);
        if(returnDTO != null) {
            MessageVO vo = new MessageVO();
            BeanUtils.copyProperties(returnDTO, vo);
            return ResponseEntity.created(vo);
        }
        return ResponseEntity.notFound().build();
    }
    
    @GetMapping("/files")
    public ResponseEntity<RandomAccessFile> getFile(@RequestParam("fileName") String fileName, @RequestParam("fullPath") String fullPath, 
            @RequestParam("mimetype") String mimetype) {
        FileStorage fs = FileStorageFactory.newInstance();
        RandomAccessFile raf = fs.read(fullPath);
        return ResponseEntity.ok(raf, mimetype, fileName);
    }
    
    /**
     * 判断是否为图片类型
     * @param fileType
     * @return
     */
    private boolean isImage(String fileType) {
        if("image/jpeg".equalsIgnoreCase(fileType)) {
            return true;
        }
        if("image/png".equalsIgnoreCase(fileType)) {
            return true;
        }
        return false;
    }
    
    /**
     * 得到缩略图宽度
     * @param width
     * @return
     */
    private short getThumbWidth(int width) {
        if(width <= 119) {
            return (short)width;
        }
        return 119;
    }
    
    /**
     * 得到缩略图宽度
     * @param width
     * @return
     */
    private short getThumbHeight(int height) {
        if(height <= 81) {
            return (short)height;
        }
        return 81;
    }
    
    /**
     * 得到文件扩展名
     * @param fileName
     * @return
     */
    private String getFileExtension(String fileName) {
        String[] nameSplit = fileName.split("[.]");
        return nameSplit[nameSplit.length - 1];
    }
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/UserChannelController.java
================================================
package org.leo.im.http.controller;

import java.util.ArrayList;
import java.util.List;

import org.leo.im.api.dto.UserChannelDTO;
import org.leo.im.api.provider.ServiceFactory;
import org.leo.im.api.service.UserChannelService;
import org.leo.im.http.vo.UserChannelVO;
import org.leo.im.service.support.ServiceProxy;
import org.leo.im.util.BeanUtils;
import org.leo.web.annotation.GetMapping;
import org.leo.web.annotation.PatchMapping;
import org.leo.web.annotation.PathVariable;
import org.leo.web.annotation.PostMapping;
import org.leo.web.annotation.RequestBody;
import org.leo.web.annotation.RequestHeader;
import org.leo.web.annotation.RequestMapping;
import org.leo.web.annotation.RequestParam;
import org.leo.web.annotation.RestController;
import org.leo.web.rest.ResponseEntity;

@RestController
@RequestMapping("/userChannels")
public final class UserChannelController extends BaseController {
    
    @GetMapping("/{userId}")
    public ResponseEntity<List<UserChannelVO>> listUserChannel(@PathVariable("userId") String userId, 
            @RequestParam("limit") int limit) {
        UserChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserChannelService());
        List<UserChannelDTO> dtoList = serviceProxy.listUserChannel(userId, null, limit);
        if(dtoList.isEmpty()) {
            return ResponseEntity.ok(new ArrayList<UserChannelVO>());
        }
        List<UserChannelVO> voList = new ArrayList<>(dtoList.size());
        for(UserChannelDTO dto : dtoList) {
            UserChannelVO vo = new UserChannelVO();
            BeanUtils.copyProperties(dto, vo);
            voList.add(vo);
        }
        return ResponseEntity.ok(voList);
    }
    
    @GetMapping("")
    public ResponseEntity<UserChannelVO> getUserChannel(@RequestParam("userId") String userId, 
            @RequestParam("channelId") String channelId) {
        UserChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserChannelService());
        UserChannelDTO dto = serviceProxy.get(userId, channelId);
        if(dto == null) {
            return ResponseEntity.notFound().build();
        }
        UserChannelVO vo = new UserChannelVO();
        BeanUtils.copyProperties(dto, vo);
        return ResponseEntity.ok(vo);
    }
    
    /**
     * 修改频道显示名称
     * @param body
     * @return
     */
    @PatchMapping("/{channelId}")
    public ResponseEntity<Integer> updateDisplayName(@PathVariable("channelId") String channelId, @RequestBody String displayName, 
            @RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        UserChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserChannelService());
        int count = serviceProxy.updateDisplayName(channelId, userId, displayName);
        return ResponseEntity.created(count);
    }
    
    /**
     * 隐藏频道
     * @param channelId
     * @param token
     * @return
     */
    @PostMapping("/{channelId}/hiding")
    public ResponseEntity<Integer> hideChannel(@PathVariable("channelId") String channelId, @RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        UserChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserChannelService());
        int count = serviceProxy.hideChannel(userId, channelId);
        return ResponseEntity.created(count);
    }
    
    /**
     * 根据名称搜索用户频道
     * @param userId
     * @param name
     * @return
     */
    @GetMapping("/{userId}/search")
    public ResponseEntity<List<UserChannelVO>> listUserChannelByName(@PathVariable("userId") String userId, 
            @RequestParam("name") String name) {
        UserChannelService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserChannelService());
        List<UserChannelDTO> dtoList = serviceProxy.listByName(userId, name, null);
        if(dtoList.isEmpty()) {
            return ResponseEntity.ok(new ArrayList<UserChannelVO>());
        }
        List<UserChannelVO> voList = new ArrayList<>(dtoList.size());
        for(UserChannelDTO dto : dtoList) {
            UserChannelVO vo = new UserChannelVO();
            BeanUtils.copyProperties(dto, vo);
            voList.add(vo);
        }
        return ResponseEntity.ok(voList);
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/controller/UserController.java
================================================
package org.leo.im.http.controller;

import org.leo.im.api.service.UserService;
import org.leo.im.common.data.Page;
import org.leo.im.http.cache.CacheManagerFactory;
import org.leo.im.http.constant.CacheKeys;
import org.leo.im.http.file.AvatarStorage;
import org.leo.im.http.file.AvatarStorageFactory;

import java.io.RandomAccessFile;
import java.util.Iterator;
import java.util.Set;

import org.leo.im.api.dto.UserDTO;
import org.leo.im.api.provider.ServiceFactory;
import org.leo.im.service.support.ServiceProxy;
import org.leo.web.annotation.GetMapping;
import org.leo.web.annotation.PatchMapping;
import org.leo.web.annotation.PathVariable;
import org.leo.web.annotation.PostMapping;
import org.leo.web.annotation.PutMapping;
import org.leo.web.annotation.RequestBody;
import org.leo.web.annotation.RequestHeader;
import org.leo.web.annotation.RequestMapping;
import org.leo.web.annotation.RequestParam;
import org.leo.web.annotation.RestController;
import org.leo.web.annotation.UploadFile;
import org.leo.web.multipart.MultipartFile;
import org.leo.web.rest.HttpStatus;
import org.leo.web.rest.ResponseEntity;

import com.alibaba.fastjson.JSONObject;

import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.cookie.Cookie;
import io.netty.handler.codec.http.cookie.ServerCookieDecoder;

/**
 * 用户控制器
 * 
 * @author Leo
 * @date 2018/4/9
 */
@RestController()
@RequestMapping("/users")
public final class UserController extends BaseController {
    
    @GetMapping("/{id}")
    public ResponseEntity<UserDTO> getById(@PathVariable() String id) {
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        UserDTO dto = serviceProxy.getById(id);
        return ResponseEntity.ok(dto);
    }
    
    @GetMapping("/me")
    public ResponseEntity<UserDTO> getCurrentUser(@RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        UserDTO dto = serviceProxy.getById(userId);
        return ResponseEntity.ok(dto);
    }
    
    @PostMapping("")
    public ResponseEntity<?> register(FullHttpRequest request, @RequestBody String body) {
        // 检查验证码
        JSONObject json = JSONObject.parseObject(body);
        String verificationCode = json.getString("verificationCode");
        if(verificationCode == null || verificationCode.trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("验证码为空");
        }
        String sessionId = getJSessionId(request);
        if(sessionId == null || sessionId.trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的请求");
        }
        Object verificationCodeInCache = CacheManagerFactory.getCacheManager().get(CacheKeys.VERIFICATION_CODE_PREFIX + sessionId);
        if(verificationCodeInCache == null || verificationCodeInCache.toString().trim().isEmpty()) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的验证码");
        }
        if(!verificationCode.equals(verificationCodeInCache)) {
            return ResponseEntity.status(HttpStatus.FORBIDDEN).build("无效的验证码");
        }
        
        // 注册用户
        UserDTO dto = new UserDTO();
        dto.setName(json.getString("name"));
        dto.setNickname(json.getString("nickname"));
        dto.setPassword(json.getString("password"));
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        serviceProxy.saveUser(dto);
        return ResponseEntity.created().build();
    }
    
    @GetMapping("")
    public ResponseEntity<Page<UserDTO>> listUser(@RequestParam("name") String name, @RequestParam("limit") int limit,
            @RequestParam("offset") int offset) {
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        Page<UserDTO> result = serviceProxy.listByNameOrNickname(name, limit, offset);
        return ResponseEntity.ok(result);
    }
    
    @PatchMapping("/{id}")
    public ResponseEntity<UserDTO> patchUser(@PathVariable() String id, @RequestBody String body) {
        JSONObject json = JSONObject.parseObject(body);
        UserDTO dto = new UserDTO();
        dto.setId(id);
        if(json.containsKey("nickname")) {
            dto.setNickname(json.getString("nickname"));
        }
        if(json.containsKey("password")) {
            dto.setPassword(json.getString("password"));
        }
        if(json.containsKey("locked")) {
            dto.setLocked(json.getBoolean("locked"));
        }
        if(json.containsKey("avatarUrl") && !json.getString("avatarUrl").trim().isEmpty()) {
            dto.setAvatarUrl(json.getString("avatarUrl"));
        }
        if(json.containsKey("lastPostAt")) {
            dto.setLastPostAt(json.getLong("lastPostAt"));
        }
        if(json.containsKey("onlineStatus")) {
            dto.setOnlineStatus(json.getString("onlineStatus"));
        }
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        UserDTO returnDTO = serviceProxy.updateUser(dto, false);
        return ResponseEntity.created(returnDTO);
    }
    
    @PostMapping("/me/avatar")
    public ResponseEntity<String> uploadAvatar(@UploadFile MultipartFile avatar, @RequestHeader("X-Token") String token) {
        String userId = this.getSubjectFromJwt(token, "userId");
        String imageType = "png";
        if("image/jpeg".equalsIgnoreCase(avatar.getFileType())) {
            imageType = "jpg";
        }
        
        // 生成两张图片,尺寸分别为 32x32、36x36、80x80
        AvatarStorage as = AvatarStorageFactory.newInstance();
        as.save(userId, imageType, avatar.getFileData(), 32, 32);
        as.save(userId, imageType, avatar.getFileData(), 36, 36);
        as.save(userId, imageType, avatar.getFileData(), 80, 80);
        return ResponseEntity.created("avatar." + imageType);
    }
    
    @GetMapping("/{id}/avatar")
    public ResponseEntity<RandomAccessFile> getMyAvatar(@PathVariable("id") String userId, @RequestParam("width") int width,
            @RequestParam("height") int height) {
        // 得到用户头像
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        UserDTO dto = serviceProxy.getById(userId);
        if(dto != null) {
            String avatarUrl = dto.getAvatarUrl();
            if(avatarUrl != null && !avatarUrl.trim().isEmpty()) {
                AvatarStorage as = AvatarStorageFactory.newInstance();
                RandomAccessFile raf = as.read(userId, avatarUrl, width, height);
                String mimetype = avatarUrl.toLowerCase().trim().endsWith("png") ? "image/png" : "image/jpeg";
                return ResponseEntity.ok(raf, mimetype);
            }
            return ResponseEntity.noContent().build();
        }
        return ResponseEntity.notFound().build();
    }
    
    @GetMapping("/nonChannelMembers")
    public ResponseEntity<Page<UserDTO>> listNonChannelMember(@RequestParam("channelId") String channelId,
            @RequestParam("username") String username, @RequestParam("limit") int limit, @RequestParam("offset") int offset) {
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        Page<UserDTO> result = serviceProxy.listNonMembers(channelId, username, limit, offset);
        return ResponseEntity.ok(result);
    }
    
    @PutMapping("/{userId}/password")
    public ResponseEntity<Integer> changePassword(@PathVariable("userId") String userId, @RequestHeader("X-Token") String token, 
            @RequestBody String body) {
        String currentUserId = this.getSubjectFromJwt(token, "userId");
        if(!userId.equals(currentUserId)) {
            return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
        }
        JSONObject data = JSONObject.parseObject(body);
        UserService serviceProxy = ServiceProxy.newProxyInstance(ServiceFactory.createUserService());
        int count = serviceProxy.updatePassword(userId, data.getString("username"), data.getString("oldPassword"), data.getString("newPassword"));
        return ResponseEntity.ok(count);
    }
    
    /**
     * 从cookie中得到Session Id
     * @return
     */
    private String getJSessionId(FullHttpRequest request) {
        try {
            String cookieStr = request.headers().get("Cookie");
            if(cookieStr == null || cookieStr.trim().isEmpty()) {
                return null;
            }
            Set<Cookie> cookies = ServerCookieDecoder.STRICT.decode(cookieStr);
            Iterator<Cookie> it = cookies.iterator();

            while (it.hasNext()) {
                Cookie cookie = it.next();
                if (cookie.name().equals(CacheKeys.JSESSIONID)) {
                    if (CacheManagerFactory.getCacheManager().get(cookie.value()) != null) {
                        return cookie.value();
                    }
                }
            }
        } catch (Exception e1) {
            return null;
        }
        return null;
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/exception/NoSuchSettingException.java
================================================
package org.leo.im.http.exception;

/**
 * 无此配置异常类
 * 
 * @author Leo
 * @date 2018/5/11
 */
public final class NoSuchSettingException extends RuntimeException {

    private static final long serialVersionUID = 1911497055661761968L;
    
    public NoSuchSettingException() {
    }

    public NoSuchSettingException(String message) {
        super(message);
    }

    public NoSuchSettingException(String message, Throwable cause) {
        super(message, cause);
    }

    public NoSuchSettingException(Throwable cause) {
        super(cause);
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/AbstractLocalFileStorage.java
================================================
package org.leo.im.http.file;

import java.io.FileNotFoundException;
import java.io.RandomAccessFile;

/**
 * 本地文件存储抽象类
 * 
 * @author Leo
 * @date 2018/5/12
 */
abstract class AbstractLocalFileStorage {
    
    /**
     * 读取文件内容
     * @param fileName
     * @return
     */
    public RandomAccessFile readFile(String fileName) {
        try {
            return new RandomAccessFile(fileName, "r");
        } catch (FileNotFoundException ignore) {
            return null;
        }
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorage.java
================================================
package org.leo.im.http.file;

import java.io.RandomAccessFile;

/**
 * 头像存储接口
 * 
 * @author Leo
 * @date 2018/5/11
 */
public interface AvatarStorage {
    
    /**
     * 保存头像
     * @param userId
     * @param fileType
     * @param data
     * @param width
     * @param height
     * @return
     */
    boolean save(String userId, String fileType, byte[] data, int width, int height);
    
    /**
     * 读取头像内容
     * @param userId
     * @param fileName
     * @param width
     * @param height
     * @return
     */
    RandomAccessFile read(String userId, String fileName, int width, int height);

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorageFactory.java
================================================
package org.leo.im.http.file;

/**
 * 头像存储工厂类
 * 
 * @author Leo
 * @date 2018/5/11
 */
public final class AvatarStorageFactory {
    
    /**
     * 创建头像存储类的实例
     * @return
     */
    public static AvatarStorage newInstance() {
        if("local".equalsIgnoreCase(System.getProperty("file.settings.driver"))) {
            return new LocalAvatarStorage();
        }
        return new LocalAvatarStorage();
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/FileStorage.java
================================================
package org.leo.im.http.file;

import java.io.RandomAccessFile;

/**
 * 文件存储接口
 * 
 * @author Leo
 * @date 2018/5/11
 */
public interface FileStorage {
    
    /**
     * 保存文件
     * @param key
     * @param fileName
     * @param data
     * @return
     */
    boolean save(String key, String fileName, byte[] data);
    
    /**
     * 保存预览图片
     * @param key
     * @param fileName
     * @param data
     * @param width
     * @param height
     * @return
     */
    short[] saveThumb(String key, String fileName, byte[] data, int width, int height);

    /**
     * 读取文件内容
     * @param fileName
     * @return
     */
    RandomAccessFile read(String fileName);
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/FileStorageFactory.java
================================================
package org.leo.im.http.file;

/**
 * 文件存储工厂类
 * @author Administrator
 *
 */
public final class FileStorageFactory {

    /**
     * 得到文件存储类的实例
     * @return
     */
    public static FileStorage newInstance() {
        if("local".equalsIgnoreCase(System.getProperty("file.settings.driver"))) {
            return new LocalFileStorage();
        }
        return new LocalFileStorage();
    }
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/LocalAvatarStorage.java
================================================
package org.leo.im.http.file;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;

import org.leo.im.http.exception.NoSuchSettingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.coobird.thumbnailator.Thumbnails;

/**
 * 本地存储头像实现类
 * 
 * @author Leo
 * @date 2018/5/11
 */
class LocalAvatarStorage extends AbstractLocalFileStorage implements AvatarStorage {
    
    private static Logger logger = LoggerFactory.getLogger(LocalAvatarStorage.class);

    /**
     * 保存头像
     * @param userId
     * @param fileType
     * @param data
     * @param width
     * @param height
     * @return
     */
    @Override
    public boolean save(String userId, String fileType, byte[] data, int width, int height) {
        StringBuilder newFile = new StringBuilder(256);
        newFile.append(System.getProperty("file.settings.directory"));
        if(newFile.length() == 0) {
            throw new NoSuchSettingException("file.settings.directory");
        }
        if(userId != null && !userId.trim().isEmpty()) {
            newFile.append("/").append(userId);
        }
        // 判断目录是否存在
        File dir = new File(newFile.toString());
        if(!dir.exists()) {
            dir.mkdir();
        }
        
        newFile.append("/avatar").append(width).append("x").append(height).append(".").append(fileType);
        InputStream is = new ByteArrayInputStream(data);
        try {
            Thumbnails.of(is).size(width > 70 ? width : width * 2, height > 70 ? height : height * 2).toFile(newFile.toString());
        } catch (IOException e) {
            logger.error(e.getMessage());
            return false;
        }
        return true;
    }
    
    /**
     * 读取头像内容
     * @param userId
     * @param fileName
     * @param width
     * @param height
     * @return
     */
    @Override
    public RandomAccessFile read(String userId, String fileName, int width, int height) {
        StringBuilder file = new StringBuilder(256);
        file.append(System.getProperty("file.settings.directory"));
        if(file.length() == 0) {
            throw new NoSuchSettingException("file.settings.directory");
        }
        if(userId != null && !userId.trim().isEmpty()) {
            file.append("/").append(userId);
        }
        String[] fileNameSplit = fileName.split("\\.");
        file.append("/avatar").append(width).append("x").append(height).append(".").append(fileNameSplit[fileNameSplit.length - 1]);
        try {
            return new RandomAccessFile(file.toString(), "r");
        } catch (FileNotFoundException e) {
            return null;
        }
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/file/LocalFileStorage.java
================================================
package org.leo.im.http.file;

import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;

import javax.imageio.ImageIO;

import org.leo.im.http.exception.NoSuchSettingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.coobird.thumbnailator.Thumbnails;

/**
 * 本地文件存储实现类
 * 
 * @author Leo
 * @date 2018/5/11
 */
class LocalFileStorage extends AbstractLocalFileStorage implements FileStorage {
    
    private static Logger logger = LoggerFactory.getLogger(LocalFileStorage.class);

    /**
     * 保存文件
     * @param key
     * @param fileName
     * @param data
     */
    @Override
    public boolean save(String key, String fileName, byte[] data) {
        StringBuilder newFile = new StringBuilder(256);
        newFile.append(System.getProperty("file.settings.directory"));
        if(newFile.length() == 0) {
            throw new NoSuchSettingException("file.settings.directory");
        }
        if(key != null && !key.trim().isEmpty()) {
            newFile.append("/").append(key);
        }
        // 判断目录是否存在
        File dir = new File(newFile.toString());
        if(!dir.exists()) {
            dir.mkdirs();
        }
        
        // 创建文件
        newFile.append("/").append(fileName);
        File file = new File(newFile.toString());
        OutputStream os = null;
        try {
            file.createNewFile();
            os = new FileOutputStream(file);
            os.write(data);
            return true;
        } catch (IOException e) {
            logger.error(e.getMessage());
            return false;
        } finally {
            if(os != null) {
                try {
                    os.close();
                } catch (IOException e) {
                    logger.error(e.getMessage());
                }
            }
        }
    }
    
    /**
     * 保存预览图片
     * @param key
     * @param fileName
     * @param data
     * @param width
     * @param height
     * @return
     */
    @Override
    public short[] saveThumb(String key, String fileName, byte[] data, int width, int height) {
        StringBuilder newFile = new StringBuilder(256);
        newFile.append(System.getProperty("file.settings.directory"));
        if(newFile.length() == 0) {
            throw new NoSuchSettingException("file.settings.directory");
        }
        if(key != null && !key.trim().isEmpty()) {
            newFile.append("/").append(key);
        }
        // 判断目录是否存在
        File dir = new File(newFile.toString());
        if(!dir.exists()) {
            dir.mkdir();
        }
        
        newFile.append("/").append(fileName);
        InputStream is = new ByteArrayInputStream(data);
        try {
            Thumbnails.of(is).size(width, height).toFile(newFile.toString());
            File picture = new File(newFile.toString());
            BufferedImage sourceImage = ImageIO.read(new FileInputStream(picture));
            return new short[] { (short)sourceImage.getWidth(), (short)sourceImage.getHeight() };
        } catch (IOException e) {
            logger.error(e.getMessage());
            return null;
        }
    }

    @Override
    public RandomAccessFile read(String fileName) {
        StringBuilder file = new StringBuilder(256);
        file.append(System.getProperty("file.settings.directory"));
        if(file.length() == 0) {
            throw new NoSuchSettingException("file.settings.directory");
        }
        file.append("/").append(fileName);
        try {
            return new RandomAccessFile(file.toString(), "r");
        } catch (FileNotFoundException e) {
            return null;
        }
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/interceptor/AuthenticationInterceptor.java
================================================
package org.leo.im.http.interceptor;

import org.leo.im.http.util.JwtUtils;
import org.leo.web.rest.HttpResponse;
import org.leo.web.rest.HttpStatus;
import org.leo.web.rest.interceptor.Interceptor;

import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 身份认证拦截器
 * 
 * @author Leo
 * @date 2018/4/3
 */
public class AuthenticationInterceptor implements Interceptor {

    @Override
    public boolean preHandle(FullHttpRequest request, HttpResponse response) throws Exception {
        if (request.method().name().equalsIgnoreCase("OPTIONS")) {
            return true;
        }
        try {
            JwtUtils.parseJWT(request.headers().get("X-Token"), System.getProperty("jwt.secret"));
            return true;
        } catch (Exception e) {
            response.write(HttpStatus.UNAUTHORIZED, "Unauthorized");
            return false;
        }
    }

    @Override
    public void postHandle(FullHttpRequest request, HttpResponse response) throws Exception {
    }

    @Override
    public void afterCompletion(FullHttpRequest request, HttpResponse response) {
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/interceptor/CorsInterceptor.java
================================================
package org.leo.im.http.interceptor;

import org.leo.web.rest.HttpResponse;
import org.leo.web.rest.interceptor.Interceptor;

import io.netty.handler.codec.http.FullHttpRequest;

/**
 * 跨域拦截器
 * 
 * @author Leo
 * @date 2018/4/2
 */
public final class CorsInterceptor implements Interceptor {

    @Override
    public boolean preHandle(FullHttpRequest request, HttpResponse response) throws Exception {
        // 使用axios发送cookie,这里不能用*,需要使用Web前端地址,如:http://localhost:8080
        // response.getHeaders().put("Access-Control-Allow-Origin", "*");
        response.getHeaders().put("Access-Control-Allow-Origin", System.getProperty("http.origin"));
        response.getHeaders().put("Access-Control-Allow-Methods", "POST, PUT, GET, OPTIONS, DELETE, PATCH");
        response.getHeaders().put("Access-Control-Max-Age", "3600");
        response.getHeaders().put("Access-Control-Allow-Headers", "Content-Type,X-Token");
        response.getHeaders().put("Access-Control-Allow-Credentials", "true");
        return true;
    }

    @Override
    public void postHandle(FullHttpRequest request, HttpResponse response) throws Exception {
    }

    @Override
    public void afterCompletion(FullHttpRequest request, HttpResponse response) {
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/util/JwtUtils.java
================================================
package org.leo.im.http.util;

import java.util.Base64;
import java.util.Date;

import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;

/**
 * Jwt工具类
 * 
 * @author Leo
 * @date 2018/3/28
 */
public class JwtUtils {

    /**
     * 生成加密key
     * 
     * @param secret
     * @return
     */
    private static SecretKey generalKey(String secret) {
        byte[] encodedKey = Base64.getDecoder().decode(secret);
        SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
        return key;
    }

    /**
     * 创建jwt
     * 
     * @param subject
     * @param secret
     * @param ttlMillis
     * @return
     */
    public static String createJWT(String subject, String secret, long ttlMillis) {
        SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
        long nowMillis = System.currentTimeMillis();
        Date now = new Date(nowMillis);
        SecretKey key = generalKey(secret);
        JwtBuilder builder = Jwts.builder().setId("jwt").setIssuedAt(now).setSubject(subject)
                .signWith(signatureAlgorithm, key);
        if (ttlMillis >= 0) {
            long expMillis = nowMillis + ttlMillis;
            Date exp = new Date(expMillis);
            builder.setExpiration(exp);
        }
        return builder.compact();
    }

    /**
     * 解密jwt
     * 
     * @param jwt
     * @param secret
     * @return
     * @throws Exception
     */
    public static Claims parseJWT(String jwt, String secret) {
        SecretKey key = generalKey(secret);
        Claims claims = Jwts.parser().setSigningKey(key).parseClaimsJws(jwt).getBody();
        return claims;
    }

}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/vo/ChannelListVO.java
================================================
package org.leo.im.http.vo;

/**
 * 频道列表vo类
 * 
 * @author Leo
 * @date 2018/4/3
 */
public final class ChannelListVO {

    private String id;

    private String name;
    
    private String displayName;

    private String otherSideOnlineStatus;

    private String type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getOtherSideOnlineStatus() {
        return otherSideOnlineStatus;
    }

    public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
        this.otherSideOnlineStatus = otherSideOnlineStatus;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "ChannelListVO [id=" + id + ", name=" + name + ", displayName=" + displayName
                + ", otherSideOnlineStatus=" + otherSideOnlineStatus + ", type=" + type + "]";
    }
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/vo/ChannelVO.java
================================================
package org.leo.im.http.vo;

import java.util.ArrayList;
import java.util.List;

import org.leo.im.api.dto.ChannelMemberDTO;

/**
 * 频道vo类
 * @author Leo
 * @date 2018/4/12
 */
public final class ChannelVO {
    
    private String id;

    private String name;
    
    private String displayName;

    private String type;

    private int memberCount;
    
    private String otherSideId;
    
    private String otherSideOnlineStatus;
    
    private String creatorId;
    
    private List<ChannelMemberDTO> members = new ArrayList<>(128);

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(int memberCount) {
        this.memberCount = memberCount;
    }

    public String getOtherSideId() {
        return otherSideId;
    }

    public void setOtherSideId(String otherSideId) {
        this.otherSideId = otherSideId;
    }

    public String getOtherSideOnlineStatus() {
        return otherSideOnlineStatus;
    }

    public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
        this.otherSideOnlineStatus = otherSideOnlineStatus;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public List<ChannelMemberDTO> getMembers() {
        return members;
    }

    @Override
    public String toString() {
        return "ChannelVO [id=" + id + ", name=" + name + ", displayName=" + displayName + ", type=" + type
                + ", memberCount=" + memberCount + ", otherSideId=" + otherSideId + ", otherSideOnlineStatus="
                + otherSideOnlineStatus + ", creatorId=" + creatorId + ", members=" + members + "]";
    }
    
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/vo/MessageVO.java
================================================
package org.leo.im.http.vo;

/**
 * 消息vo类
 * 
 * @author Leo
 * @date 2018/5/16
 */
public final class MessageVO {

    private long id;
    
    private String channelId;

    private long createAt;

    private String type;

    private String senderId;

    private String senderName;

    private String senderNickname;

    private String senderOnlineStatus;

    private String senderAvatarUrl;
    
    private String senderFirstLetterOfName;
    
    private String content;
    
    private String fileName;
    
    private String fileExtension;
    
    private int fileSize;
    
    private String fileMimeType;
    
    private String fileThumbPath;
    
    private String filePath;  
    
    private int imageWidth;
    
    private int imageHeight;
    
    private short imageThumbWidth;
    
    private short imageThumbHeight;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(long createAt) {
        this.createAt = createAt;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderNickname() {
        return senderNickname;
    }

    public void setSenderNickname(String senderNickname) {
        this.senderNickname = senderNickname;
    }

    public String getSenderOnlineStatus() {
        return senderOnlineStatus;
    }

    public void setSenderOnlineStatus(String senderOnlineStatus) {
        this.senderOnlineStatus = senderOnlineStatus;
    }

    public String getSenderAvatarUrl() {
        return senderAvatarUrl;
    }

    public void setSenderAvatarUrl(String senderAvatarUrl) {
        this.senderAvatarUrl = senderAvatarUrl;
    }

    public String getSenderFirstLetterOfName() {
        return senderFirstLetterOfName;
    }

    public void setSenderFirstLetterOfName(String senderFirstLetterOfName) {
        this.senderFirstLetterOfName = senderFirstLetterOfName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileExtension() {
        return fileExtension;
    }

    public void setFileExtension(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    public int getFileSize() {
        return fileSize;
    }

    public void setFileSize(int fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileMimeType() {
        return fileMimeType;
    }

    public void setFileMimeType(String fileMimeType) {
        this.fileMimeType = fileMimeType;
    }

    public String getFileThumbPath() {
        return fileThumbPath;
    }

    public void setFileThumbPath(String fileThumbPath) {
        this.fileThumbPath = fileThumbPath;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
    
    public int getImageWidth() {
        return imageWidth;
    }

    public void setImageWidth(int imageWidth) {
        this.imageWidth = imageWidth;
    }

    public int getImageHeight() {
        return imageHeight;
    }

    public void setImageHeight(int imageHeight) {
        this.imageHeight = imageHeight;
    }

    public short getImageThumbWidth() {
        return imageThumbWidth;
    }

    public void setImageThumbWidth(short imageThumbWidth) {
        this.imageThumbWidth = imageThumbWidth;
    }

    public short getImageThumbHeight() {
        return imageThumbHeight;
    }

    public void setImageThumbHeight(short imageThumbHeight) {
        this.imageThumbHeight = imageThumbHeight;
    }

    public String getSenderRealAvatarUrl() {
        if("http://".equalsIgnoreCase(this.senderAvatarUrl) || "https://".equalsIgnoreCase(this.senderAvatarUrl)) {
            return this.senderAvatarUrl;
        }
        if(this.senderAvatarUrl != null && !this.senderAvatarUrl.trim().isEmpty()) {
            return this.senderAvatarUrl;
        }
        return null;
    }

    @Override
    public String toString() {
        return "MessageVO [id=" + id + ", channelId=" + channelId + ", createAt=" + createAt + ", type=" + type
                + ", senderId=" + senderId + ", senderName=" + senderName + ", senderNickname=" + senderNickname
                + ", senderOnlineStatus=" + senderOnlineStatus + ", senderAvatarUrl=" + senderAvatarUrl
                + ", senderFirstLetterOfName=" + senderFirstLetterOfName + ", content=" + content + ", fileName="
                + fileName + ", fileExtension=" + fileExtension + ", fileSize=" + fileSize + ", fileMimeType="
                + fileMimeType + ", fileThumbPath=" + fileThumbPath + ", filePath=" + filePath + ", imageWidth="
                + imageWidth + ", imageHeight=" + imageHeight + ", imageThumbWidth=" + imageThumbWidth
                + ", imageThumbHeight=" + imageThumbHeight + "]";
    }
 
}


================================================
FILE: leo-im-http/src/main/java/org/leo/im/http/vo/UserChannelVO.java
================================================
package org.leo.im.http.vo;

/**
 * 用户频道vo类
 * 
 * @author Leo
 * @date 2018/4/20
 */
public final class UserChannelVO {
    
    private String channelId;
    
    private String channelName;
    
    private String channelType;
    
    private String channelDisplayName;
    
    private String channelDescription;
    
    private String toUserId;
    
    private String toUserOnlineStatus;
    
    private short unreadMessageCount;
    
    private int memberCount;
    
    private String creatorId;

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public String getChannelDisplayName() {
        return channelDisplayName;
    }

    public void setChannelDisplayName(String channelDisplayName) {
        this.channelDisplayName = channelDisplayName;
    }

    public String getChannelDescription() {
        return channelDescription;
    }

    public void setChannelDescription(String channelDescription) {
        this.channelDescription = channelDescription;
    }

    public String getToUserId() {
        return toUserId;
    }

    public void setToUserId(String toUserId) {
        this.toUserId = toUserId;
    }

    public String getToUserOnlineStatus() {
        return toUserOnlineStatus;
    }

    public void setToUserOnlineStatus(String toUserOnlineStatus) {
        this.toUserOnlineStatus = toUserOnlineStatus;
    }

    public short getUnreadMessageCount() {
        return unreadMessageCount;
    }

    public void setUnreadMessageCount(short unreadMessageCount) {
        this.unreadMessageCount = unreadMessageCount;
    }

    public int getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(int memberCount) {
        this.memberCount = memberCount;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    @Override
    public String toString() {
        return "UserChannelVO [channelId=" + channelId + ", channelName=" + channelName + ", channelType=" + channelType
                + ", channelDisplayName=" + channelDisplayName + ", channelDescription=" + channelDescription
                + ", toUserId=" + toUserId + ", toUserOnlineStatus=" + toUserOnlineStatus + ", unreadMessageCount="
                + unreadMessageCount + ", memberCount=" + memberCount + ", creatorId=" + creatorId + "]";
    }
    
}


================================================
FILE: leo-im-http/src/test/java/org/leo/im/http/AppTest.java
================================================
package org.leo.im.http;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTest 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
}


================================================
FILE: leo-im-http/target/classes/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Built-By: Administrator
Class-Path: asm-6.1.jar thumbnailator-0.4.8.jar netty-all-4.1.24.Final
 .jar fastjson-1.2.47.jar netty-rest-server-1.0.jar leo-im-api-1.0.jar
  leo-im-api-provider-1.0.jar leo-im-service-1.0.jar leo-im-store-1.0.
 jar mysql-connector-java-8.0.11.jar protobuf-java-2.6.0.jar druid-1.1
 .9.jar leo-im-model-1.0.jar leo-im-util-1.0.jar cglib-3.2.6.jar ant-1
 .9.6.jar ant-launcher-1.9.6.jar jjwt-0.9.0.jar jackson-databind-2.8.9
 .jar jackson-annotations-2.8.0.jar jackson-core-2.8.9.jar leo-im-noti
 fication-1.0.jar jedis-2.9.0.jar commons-pool2-2.4.2.jar leo-im-commo
 n-1.0.jar slf4j-api-1.7.25.jar logback-classic-1.2.3.jar logback-core
 -1.2.3.jar
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
Main-Class: org.leo.im.starter.App



================================================
FILE: leo-im-http/target/classes/META-INF/maven/org.leo.im/leo-im-http/pom.properties
================================================
#Generated by Maven Integration for Eclipse
#Tue Jun 19 09:17:34 CST 2018
version=1.0
groupId=org.leo.im
m2e.projectName=leo-im-http
m2e.projectLocation=F\:\\Develop\\open-source\\leo-im-server\\leo-im-http
artifactId=leo-im-http


================================================
FILE: leo-im-http/target/classes/META-INF/maven/org.leo.im/leo-im-http/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-http</artifactId>
	<name>leo-im-http</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
			<version>6.1</version>
		</dependency>
		<dependency>
			<groupId>net.coobird</groupId>
			<artifactId>thumbnailator</artifactId>
			<version>0.4.8</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-all</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>${fastjson.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo</groupId>
			<artifactId>netty-rest-server</artifactId>
			<version>1.0</version>
			<!-- 
			<scope>system</scope>
			<systemPath>${project.basedir}/lib/netty-rest-server-1.0.jar</systemPath>
			 -->
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api</artifactId>
			<version>${parent.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-api-provider</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-util</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-notification</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.leo.im</groupId>
			<artifactId>leo-im-common</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</project>


================================================
FILE: leo-im-http/target/maven-archiver/pom.properties
================================================
#Generated by Maven
#Tue Jun 12 16:14:21 CST 2018
version=1.0
groupId=org.leo.im
artifactId=leo-im-http


================================================
FILE: leo-im-http/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
================================================


================================================
FILE: leo-im-http/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\BaseController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\interceptor\AuthenticationInterceptor.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\ChannelController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\cache\CacheManagerFactory.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\HttpServer.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\interceptor\CorsInterceptor.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\vo\ChannelVO.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\cache\CacheManager.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\AuthController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\vo\UserChannelVO.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\exception\NoSuchSettingException.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\LocalAvatarStorage.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\cache\MapCacheManager.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\LocalFileStorage.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\ExceptionController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\AvatarStorage.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\cache\Cache.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\util\JwtUtils.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\vo\ChannelListVO.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\FileStorage.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\MessageController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\UserChannelController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\vo\MessageVO.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\AvatarStorageFactory.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\controller\UserController.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\AbstractLocalFileStorage.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\file\FileStorageFactory.java
F:\Develop\open-source\leo-im-server\leo-im-http\src\main\java\org\leo\im\http\constant\CacheKeys.java


================================================
FILE: leo-im-http/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
================================================


================================================
FILE: leo-im-http/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
================================================
F:\Develop\open-source\leo-im-server\leo-im-http\src\test\java\org\leo\im\http\AppTest.java


================================================
FILE: leo-im-http/target/surefire-reports/TEST-org.leo.im.http.AppTest.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="org.leo.im.http.AppTest" time="0.002" errors="0" skipped="0">
  <properties>
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
    <property name="sun.boot.library.path" value="E:\Software\Java\jdk1.8.0_131\jre\bin"/>
    <property name="java.vm.version" value="25.131-b11"/>
    <property name="java.vm.vendor" value="Oracle Corporation"/>
    <property name="maven.multiModuleProjectDirectory" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.vendor.url" value="http://java.oracle.com/"/>
    <property name="path.separator" value=";"/>
    <property name="guice.disable.misplaced.annotation.check" value="true"/>
    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
    <property name="file.encoding.pkg" value="sun.io"/>
    <property name="user.script" value=""/>
    <property name="user.country" value="CN"/>
    <property name="sun.java.launcher" value="SUN_STANDARD"/>
    <property name="sun.os.patch.level" value=""/>
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
    <property name="user.dir" value="F:\Develop\open-source\leo-im-server"/>
    <property name="java.runtime.version" value="1.8.0_131-b11"/>
    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
    <property name="java.endorsed.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\endorsed"/>
    <property name="os.arch" value="amd64"/>
    <property name="java.io.tmpdir" value="C:\Users\ADMINI~1\AppData\Local\Temp\"/>
    <property name="line.separator" value="
"/>
    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
    <property name="user.variant" value=""/>
    <property name="os.name" value="Windows 10"/>
    <property name="classworlds.conf" value="E:\Eclipse_Workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf8379869101416676275.tmp"/>
    <property name="sun.jnu.encoding" value="GBK"/>
    <property name="java.library.path" value="E:\Software\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin/server;E:/Software/Java/jdk1.8.0_131/bin/../jre/bin;E:/Software/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\Software\Java\jdk1.8.0_131\bin;F:\Software\python-3.6.1-embed-amd64;E:\Software\node-v6.11.1-win-x64;E:\Software\nodejs\;e:\Software\Git\cmd;E:\Software\go\bin;E:\Software\TortoiseGit\bin;e:\software\SSH Communications Security\SSH Secure Shell;E:\Software\Microsoft VS Code\bin;F:\Develop\nodejs\node_global;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm;;C:\Users\Administrator\Desktop;;."/>
    <property name="java.specification.name" value="Java Platform API Specification"/>
    <property name="java.class.version" value="52.0"/>
    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
    <property name="os.version" value="10.0"/>
    <property name="user.home" value="C:\Users\Administrator"/>
    <property name="user.timezone" value="Asia/Shanghai"/>
    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
    <property name="java.specification.version" value="1.8"/>
    <property name="file.encoding" value="GBK"/>
    <property name="user.name" value="Administrator"/>
    <property name="java.class.path" value="/C:/Users/Administrator/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.1.20161104-1803/jars/plexus-classworlds-2.5.2.jar"/>
    <property name="java.vm.specification.version" value="1.8"/>
    <property name="sun.arch.data.model" value="64"/>
    <property name="java.home" value="E:\Software\Java\jdk1.8.0_131\jre"/>
    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B -gs F:\Software\apache-maven-3.3.9\conf\settings.xml -s F:\Software\apache-maven-3.3.9\conf\settings.xml package"/>
    <property name="java.specification.vendor" value="Oracle Corporation"/>
    <property name="user.language" value="zh"/>
    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
    <property name="java.vm.info" value="mixed mode"/>
    <property name="java.version" value="1.8.0_131"/>
    <property name="java.ext.dirs" value="E:\Software\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
    <property name="sun.boot.class.path" value="E:\Software\Java\jdk1.8.0_131\jre\lib\resources.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\rt.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jsse.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jce.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\charsets.jar;E:\Software\Java\jdk1.8.0_131\jre\lib\jfr.jar;E:\Software\Java\jdk1.8.0_131\jre\classes"/>
    <property name="java.vendor" value="Oracle Corporation"/>
    <property name="maven.home" value="F:\Develop\open-source\leo-im-server\EMBEDDED"/>
    <property name="file.separator" value="\"/>
    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
    <property name="sun.cpu.endian" value="little"/>
    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
    <property name="sun.desktop" value="windows"/>
    <property name="sun.cpu.isalist" value="amd64"/>
  </properties>
  <testcase classname="org.leo.im.http.AppTest" name="testApp" time="0.002"/>
</testsuite>

================================================
FILE: leo-im-http/target/surefire-reports/org.leo.im.http.AppTest.txt
================================================
-------------------------------------------------------------------------------
Test set: org.leo.im.http.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec


================================================
FILE: leo-im-migration/.classpath
================================================
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
		<attributes>
			<attribute name="optional" value="true"/>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


================================================
FILE: leo-im-migration/.project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>leo-im-migration</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
	</natures>
</projectDescription>


================================================
FILE: leo-im-migration/.settings/org.eclipse.core.resources.prefs
================================================
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8


================================================
FILE: leo-im-migration/.settings/org.eclipse.jdt.core.prefs
================================================
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8


================================================
FILE: leo-im-migration/.settings/org.eclipse.m2e.core.prefs
================================================
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1


================================================
FILE: leo-im-migration/pom.xml
================================================
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.leo.im</groupId>
		<artifactId>leo-im</artifactId>
		<version>1.0</version>
	</parent>
	<artifactId>leo-im-migration</artifactId>
	<name>leo-im-migration</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.flywaydb</groupId>
			<artifactId>flyway-core</artifactId>
			<version>${flyway-core.version}</version>
		</dependency>
	</dependencies>
</project>


================================================
FILE: leo-im-migration/src/main/java/org/leo/im/migration/FlywayMigration.java
================================================
package org.leo.im.migration;

import org.flywaydb.core.Flyway;

public class FlywayMigration {
	
	/**
	 * 数据库迁移
	 * @param url JDBC URL
	 * @param user 数据库用户
	 * @param password 数据库口令
	 */
	public void migrate(String url, String user, String password) {
		Flyway flyway = new Flyway();
		flyway.setDataSource(url, user, password);
		flyway.migrate();
	}

}


================================================
FILE: leo-im-migration/src/main/resources/db/migration/V20180615___Init.sql
================================================
CREATE TABLE IF NOT EXISTS `im_channel` (
  `id` char(32) NOT NULL,
  `name` varchar(64) NOT NULL,
  `type` char(1) NOT NULL,
  `purpose` varchar(256) DEFAULT NULL,
  `create_at` bigint(20) unsigned NOT NULL,
  `delete_at` bigint(20) unsigned NOT NULL DEFAULT '0',
  `last_post_at` bigint(20) unsigned NOT NULL DEFAULT '0',
  `member_count` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `creator_id` char(32) NOT NULL DEFAULT '0',
  `from_user_id` char(32) DEFAULT '0',
  `to_user_id` char(32) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_channel_member` (
  `channel_id` char(32) NOT NULL,
  `user_id` char(32) NOT NULL,
  `is_admin` tinyint(3) unsigned NOT NULL,
  PRIMARY KEY (`channel_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_file` (
  `id` char(32) NOT NULL,
  `name` varchar(128) NOT NULL,
  `extension` varchar(32) NOT NULL,
  `size` int(11) NOT NULL,
  `mime_typ` varchar(256) NOT NULL,
  `width` smallint(6) NOT NULL,
  `height` smallint(6) NOT NULL,
  `path` varchar(128) NOT NULL,
  `thumb_width` smallint(6) DEFAULT NULL,
  `thumb_height` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_hide_channel` (
  `user_id` char(32) NOT NULL,
  `channel_id` char(32) NOT NULL,
  PRIMARY KEY (`user_id`,`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_message` (
  `id` bigint(20) unsigned NOT NULL,
  `channel_id` char(32) COLLATE utf8mb4_bin NOT NULL,
  `sender_id` char(32) COLLATE utf8mb4_bin NOT NULL,
  `create_at` bigint(20) NOT NULL,
  `type` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  `content` varchar(3000) COLLATE utf8mb4_bin DEFAULT NULL,
  `delete_at` bigint(20) NOT NULL DEFAULT '0',
  `file_id` char(32) COLLATE utf8mb4_bin DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE IF NOT EXISTS `im_unread_message_count` (
  `user_id` char(32) NOT NULL,
  `channel_id` char(32) NOT NULL,
  `total` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_user` (
  `id` char(32) NOT NULL,
  `name` varchar(32) NOT NULL,
  `name_first_letter` char(1) NOT NULL,
  `nickname` varchar(32) NOT NULL,
  `salt` varchar(64) NOT NULL,
  `password` varchar(64) NOT NULL,
  `locked` tinyint(4) NOT NULL DEFAULT '0',
  `avatar_url` varchar(512) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `last_post_at` bigint(20) DEFAULT NULL,
  `online_status` varchar(7) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `im_user_channel` (
  `user_id` char(32) NOT NULL,
  `channel_id` char(32) NOT NULL,
  `display_name` varchar(64) NOT NULL,
  `to_user_id` char(32) DEFAULT NULL,
  PRIMARY KEY (`user_id`,`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `im_user` (`id`, `name`, `name_first_letter`, `nickname`, `salt`, `password`, `locked`, `avatar_url`, `created_at`, `last_post_at`, `online_status`) VALUES
    ('00000000000000000000000000000000', 'leo', 'l', '系统用户', 'MOlssyhqweLKffidserewr==', 'FDFGHTY33456FDHG000FDEKKKLLLPP', 0, NULL, '2018-06-16 21:00:00', NULL, NULL);


================================================
FILE: leo-im-migration/src/test/java/org/leo/im/migration/AppTest.java
================================================
package org.leo.im.migration;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTest 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTest.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
}


================================================
FILE: leo-im-migration/target/classes/META-INF/MANIFEST.MF
================================================
Manifest-Version: 1.0
Built-By: Administrator
Class-Path: flyway-core-5.1.1.jar slf4j-api-1.7.25.jar logback-classic
 -1.2.3.jar logback-core-1.2.3.jar
Build-Jdk: 1.8.0_131
Cre
Download .txt
gitextract_5xra_4nj/

├── .classpath
├── .gitignore
├── .project
├── .settings/
│   ├── org.eclipse.core.resources.prefs
│   ├── org.eclipse.jdt.core.prefs
│   └── org.eclipse.m2e.core.prefs
├── LICENSE
├── README.md
├── assemble/
│   ├── bin/
│   │   ├── run.bat
│   │   └── run.sh
│   └── package.xml
├── leo-im-api/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── api/
│   │   │                       ├── annotation/
│   │   │                       │   ├── Cacheable.java
│   │   │                       │   └── Transactional.java
│   │   │                       ├── dto/
│   │   │                       │   ├── ChannelDTO.java
│   │   │                       │   ├── ChannelListDTO.java
│   │   │                       │   ├── ChannelMemberDTO.java
│   │   │                       │   ├── FileDTO.java
│   │   │                       │   ├── MessageDTO.java
│   │   │                       │   ├── UserChannelDTO.java
│   │   │                       │   └── UserDTO.java
│   │   │                       ├── exception/
│   │   │                       │   └── ServiceException.java
│   │   │                       └── service/
│   │   │                           ├── ChannelService.java
│   │   │                           ├── MessageService.java
│   │   │                           ├── UnreadMessageCountService.java
│   │   │                           ├── UserChannelService.java
│   │   │                           └── UserService.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── api/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-api/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.api.AppTest.xml
│           └── org.leo.im.api.AppTest.txt
├── leo-im-api-provider/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── api/
│   │   │                       └── provider/
│   │   │                           └── ServiceFactory.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── api/
│   │                           └── provider/
│   │                               └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-api-provider/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.api.provider.AppTest.xml
│           └── org.leo.im.api.provider.AppTest.txt
├── leo-im-common/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── common/
│   │   │                       └── data/
│   │   │                           └── Page.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── common/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-common/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.common.AppTest.xml
│           └── org.leo.im.common.AppTest.txt
├── leo-im-http/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── http/
│   │   │                       ├── HttpServer.java
│   │   │                       ├── cache/
│   │   │                       │   ├── Cache.java
│   │   │                       │   ├── CacheManager.java
│   │   │                       │   ├── CacheManagerFactory.java
│   │   │                       │   └── MapCacheManager.java
│   │   │                       ├── constant/
│   │   │                       │   └── CacheKeys.java
│   │   │                       ├── controller/
│   │   │                       │   ├── AuthController.java
│   │   │                       │   ├── BaseController.java
│   │   │                       │   ├── ChannelController.java
│   │   │                       │   ├── ExceptionController.java
│   │   │                       │   ├── MessageController.java
│   │   │                       │   ├── UserChannelController.java
│   │   │                       │   └── UserController.java
│   │   │                       ├── exception/
│   │   │                       │   └── NoSuchSettingException.java
│   │   │                       ├── file/
│   │   │                       │   ├── AbstractLocalFileStorage.java
│   │   │                       │   ├── AvatarStorage.java
│   │   │                       │   ├── AvatarStorageFactory.java
│   │   │                       │   ├── FileStorage.java
│   │   │                       │   ├── FileStorageFactory.java
│   │   │                       │   ├── LocalAvatarStorage.java
│   │   │                       │   └── LocalFileStorage.java
│   │   │                       ├── interceptor/
│   │   │                       │   ├── AuthenticationInterceptor.java
│   │   │                       │   └── CorsInterceptor.java
│   │   │                       ├── util/
│   │   │                       │   └── JwtUtils.java
│   │   │                       └── vo/
│   │   │                           ├── ChannelListVO.java
│   │   │                           ├── ChannelVO.java
│   │   │                           ├── MessageVO.java
│   │   │                           └── UserChannelVO.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── http/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-http/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.http.AppTest.xml
│           └── org.leo.im.http.AppTest.txt
├── leo-im-migration/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   ├── java/
│   │   │   │   └── org/
│   │   │   │       └── leo/
│   │   │   │           └── im/
│   │   │   │               └── migration/
│   │   │   │                   └── FlywayMigration.java
│   │   │   └── resources/
│   │   │       └── db/
│   │   │           └── migration/
│   │   │               └── V20180615___Init.sql
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── migration/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   ├── META-INF/
│       │   │   ├── MANIFEST.MF
│       │   │   └── maven/
│       │   │       └── org.leo.im/
│       │   │           └── leo-im-migration/
│       │   │               ├── pom.properties
│       │   │               └── pom.xml
│       │   └── db/
│       │       └── migration/
│       │           └── V20180615___Init.sql
│       ├── maven-archiver/
│       │   └── pom.properties
│       └── maven-status/
│           └── maven-compiler-plugin/
│               └── compile/
│                   └── default-compile/
│                       ├── createdFiles.lst
│                       └── inputFiles.lst
├── leo-im-model/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── model/
│   │   │                       ├── Channel.java
│   │   │                       ├── ChannelMember.java
│   │   │                       ├── File.java
│   │   │                       ├── Message.java
│   │   │                       ├── User.java
│   │   │                       └── UserChannel.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── model/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-model/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.model.AppTest.xml
│           └── org.leo.im.model.AppTest.txt
├── leo-im-notification/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── notification/
│   │   │                       ├── ActionNames.java
│   │   │                       ├── PublishKeys.java
│   │   │                       ├── Publisher.java
│   │   │                       ├── PublisherFactory.java
│   │   │                       ├── QueuePublisher.java
│   │   │                       ├── Subscriber.java
│   │   │                       ├── ThreadPoolHolder.java
│   │   │                       └── event/
│   │   │                           ├── AvatarChangedEvent.java
│   │   │                           ├── ChannelCreatedEvent.java
│   │   │                           ├── ChannelNameChangedEvent.java
│   │   │                           ├── ChannelRemovedEvent.java
│   │   │                           ├── JoinChannelEvent.java
│   │   │                           ├── LeaveChannelEvent.java
│   │   │                           ├── MembersCountChangedEvent.java
│   │   │                           ├── MessageRemovedEvent.java
│   │   │                           ├── NewMessageEvent.java
│   │   │                           ├── NicknameChangedEvent.java
│   │   │                           ├── NotificationEvent.java
│   │   │                           ├── OnlineStatusChangedEvent.java
│   │   │                           ├── ReadMessageEvent.java
│   │   │                           └── RemoveFromChannelEvent.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── notification/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-notification/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.notification.AppTest.xml
│           └── org.leo.im.notification.AppTest.txt
├── leo-im-service/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── service/
│   │   │                       ├── ChannelServiceImpl.java
│   │   │                       ├── MessageServiceImpl.java
│   │   │                       ├── UnreadMessageCountServiceImpl.java
│   │   │                       ├── UserChannelServiceImpl.java
│   │   │                       ├── UserServiceImpl.java
│   │   │                       ├── support/
│   │   │                       │   ├── CacheableHolder.java
│   │   │                       │   └── ServiceProxy.java
│   │   │                       └── util/
│   │   │                           └── PasswordUtils.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── service/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-service/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.service.AppTest.xml
│           └── org.leo.im.service.AppTest.txt
├── leo-im-socket/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── socket/
│   │   │                       ├── ChannelIdSet.java
│   │   │                       ├── ChannelsHolder.java
│   │   │                       ├── SocketChannel.java
│   │   │                       ├── WebSocketChannelInitializer.java
│   │   │                       ├── WebSocketServer.java
│   │   │                       ├── exception/
│   │   │                       │   └── MessageHandleException.java
│   │   │                       ├── handler/
│   │   │                       │   └── TextWebSocketFrameHandler.java
│   │   │                       └── subscription/
│   │   │                           ├── QueueSubscriber.java
│   │   │                           ├── SubscriberFactory.java
│   │   │                           └── handler/
│   │   │                               ├── AbstractMessageHandler.java
│   │   │                               ├── AvatarChangedHandler.java
│   │   │                               ├── ChannelCreatedHandler.java
│   │   │                               ├── ChannelNameChangedHandler.java
│   │   │                               ├── ChannelRemovedHandler.java
│   │   │                               ├── JoinChannelHandler.java
│   │   │                               ├── LeaveChannelHandler.java
│   │   │                               ├── MembersCountChangedHandler.java
│   │   │                               ├── MessageHandler.java
│   │   │                               ├── MessageHandlerFactory.java
│   │   │                               ├── NewMessageHandler.java
│   │   │                               ├── NicknameChangedHandler.java
│   │   │                               ├── OnlineStatusChangedHandler.java
│   │   │                               ├── ReadMessageHandler.java
│   │   │                               ├── RemoveFromChannelHandler.java
│   │   │                               └── RemoveMessageHandler.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── socket/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-socket/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.socket.AppTest.xml
│           └── org.leo.im.socket.AppTest.txt
├── leo-im-starter/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   ├── conf/
│   │   │   │   └── app.conf
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── starter/
│   │   │                       └── App.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── starter/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-starter/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── leo-im-starter-1.0/
│       │   ├── bin/
│       │   │   ├── run.bat
│       │   │   └── run.sh
│       │   └── conf/
│       │       └── app.conf
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.starter.AppTest.xml
│           └── org.leo.im.starter.AppTest.txt
├── leo-im-store/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── store/
│   │   │                       ├── connection/
│   │   │                       │   ├── ConnectionFactory.java
│   │   │                       │   ├── ConnectionProvider.java
│   │   │                       │   └── impl/
│   │   │                       │       └── PoolConnectionFactory.java
│   │   │                       ├── dao/
│   │   │                       │   ├── BaseDAO.java
│   │   │                       │   ├── ChannelDAO.java
│   │   │                       │   ├── ChannelMemberDAO.java
│   │   │                       │   ├── FileDAO.java
│   │   │                       │   ├── HideChannelDAO.java
│   │   │                       │   ├── MessageDAO.java
│   │   │                       │   ├── UnreadMessageCountDAO.java
│   │   │                       │   ├── UserChannelDAO.java
│   │   │                       │   ├── UserDAO.java
│   │   │                       │   └── impl/
│   │   │                       │       ├── JdbcChannelDAOImpl.java
│   │   │                       │       ├── JdbcChannelMemberDAOImpl.java
│   │   │                       │       ├── JdbcFileDAOImpl.java
│   │   │                       │       ├── JdbcHideChannelDAOImpl.java
│   │   │                       │       ├── JdbcMessageDAOImpl.java
│   │   │                       │       ├── JdbcUnreadMessageCountDAOImpl.java
│   │   │                       │       ├── JdbcUserChannelDAOImpl.java
│   │   │                       │       └── JdbcUserDAOImpl.java
│   │   │                       ├── datasource/
│   │   │                       │   ├── ConnectionPool.java
│   │   │                       │   └── impl/
│   │   │                       │       └── DruidConnectionPool.java
│   │   │                       ├── exception/
│   │   │                       │   └── DAOException.java
│   │   │                       ├── factory/
│   │   │                       │   └── DAOFactory.java
│   │   │                       ├── support/
│   │   │                       │   ├── BatchSqlBuildResult.java
│   │   │                       │   ├── Parameter.java
│   │   │                       │   ├── ParameterDataTypeEnum.java
│   │   │                       │   └── SqlBuildResult.java
│   │   │                       └── util/
│   │   │                           ├── DbUtils.java
│   │   │                           └── FirstLetterUtil.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── store/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-store/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.store.AppTest.xml
│           └── org.leo.im.store.AppTest.txt
├── leo-im-util/
│   ├── .classpath
│   ├── .project
│   ├── .settings/
│   │   ├── org.eclipse.core.resources.prefs
│   │   ├── org.eclipse.jdt.core.prefs
│   │   └── org.eclipse.m2e.core.prefs
│   ├── pom.xml
│   ├── src/
│   │   ├── main/
│   │   │   └── java/
│   │   │       └── org/
│   │   │           └── leo/
│   │   │               └── im/
│   │   │                   └── util/
│   │   │                       ├── BeanUtils.java
│   │   │                       └── JwtUtils.java
│   │   └── test/
│   │       └── java/
│   │           └── org/
│   │               └── leo/
│   │                   └── im/
│   │                       └── util/
│   │                           └── AppTest.java
│   └── target/
│       ├── classes/
│       │   └── META-INF/
│       │       ├── MANIFEST.MF
│       │       └── maven/
│       │           └── org.leo.im/
│       │               └── leo-im-util/
│       │                   ├── pom.properties
│       │                   └── pom.xml
│       ├── maven-archiver/
│       │   └── pom.properties
│       ├── maven-status/
│       │   └── maven-compiler-plugin/
│       │       ├── compile/
│       │       │   └── default-compile/
│       │       │       ├── createdFiles.lst
│       │       │       └── inputFiles.lst
│       │       └── testCompile/
│       │           └── default-testCompile/
│       │               ├── createdFiles.lst
│       │               └── inputFiles.lst
│       └── surefire-reports/
│           ├── TEST-org.leo.im.util.AppTest.xml
│           └── org.leo.im.util.AppTest.txt
└── pom.xml
Download .txt
SYMBOL INDEX (1012 symbols across 151 files)

FILE: leo-im-api-provider/src/main/java/org/leo/im/api/provider/ServiceFactory.java
  class ServiceFactory (line 18) | public final class ServiceFactory {
    method createUserService (line 25) | public static UserService createUserService() {
    method createChannelService (line 33) | public static ChannelService createChannelService() {
    method createUserChannelService (line 41) | public static UserChannelService createUserChannelService() {
    method createMessageService (line 49) | public static MessageService createMessageService() {

FILE: leo-im-api-provider/src/test/java/org/leo/im/api/provider/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelDTO.java
  class ChannelDTO (line 12) | public final class ChannelDTO {
    method getId (line 44) | public String getId() {
    method setId (line 48) | public void setId(String id) {
    method getName (line 52) | public String getName() {
    method setName (line 56) | public void setName(String name) {
    method getType (line 60) | public String getType() {
    method setType (line 64) | public void setType(String type) {
    method getMemberCount (line 68) | public int getMemberCount() {
    method setMemberCount (line 72) | public void setMemberCount(int memberCount) {
    method getCreateAt (line 76) | public long getCreateAt() {
    method setCreateAt (line 80) | public void setCreateAt(long createAt) {
    method getCreatorId (line 84) | public String getCreatorId() {
    method setCreatorId (line 88) | public void setCreatorId(String creatorId) {
    method getFromUserId (line 92) | public String getFromUserId() {
    method setFromUserId (line 96) | public void setFromUserId(String fromUserId) {
    method getFromUsername (line 100) | public String getFromUsername() {
    method setFromUsername (line 104) | public void setFromUsername(String fromUsername) {
    method getFromUserNickname (line 108) | public String getFromUserNickname() {
    method setFromUserNickname (line 112) | public void setFromUserNickname(String fromUserNickname) {
    method getToUserId (line 116) | public String getToUserId() {
    method setToUserId (line 120) | public void setToUserId(String toUserId) {
    method getToUsername (line 124) | public String getToUsername() {
    method setToUsername (line 128) | public void setToUsername(String toUsername) {
    method getToUserNickname (line 132) | public String getToUserNickname() {
    method setToUserNickname (line 136) | public void setToUserNickname(String toUserNickname) {
    method getToUserOnlineStatus (line 140) | public String getToUserOnlineStatus() {
    method setToUserOnlineStatus (line 144) | public void setToUserOnlineStatus(String toUserOnlineStatus) {
    method getMembers (line 148) | public List<ChannelMemberDTO> getMembers() {
    method getPurpose (line 152) | public String getPurpose() {
    method setPurpose (line 156) | public void setPurpose(String purpose) {
    method toString (line 160) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelListDTO.java
  class ChannelListDTO (line 9) | public class ChannelListDTO {
    method getId (line 21) | public String getId() {
    method setId (line 25) | public void setId(String id) {
    method getName (line 29) | public String getName() {
    method setName (line 33) | public void setName(String name) {
    method getDisplayName (line 37) | public String getDisplayName() {
    method setDisplayName (line 41) | public void setDisplayName(String displayName) {
    method getOtherSideOnlineStatus (line 45) | public String getOtherSideOnlineStatus() {
    method setOtherSideOnlineStatus (line 49) | public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
    method getType (line 53) | public String getType() {
    method setType (line 57) | public void setType(String type) {
    method toString (line 61) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/ChannelMemberDTO.java
  class ChannelMemberDTO (line 9) | public class ChannelMemberDTO {
    method getId (line 17) | public String getId() {
    method setId (line 21) | public void setId(String id) {
    method getNickname (line 25) | public String getNickname() {
    method setNickname (line 29) | public void setNickname(String nickname) {
    method getAdmin (line 33) | public boolean getAdmin() {
    method setAdmin (line 37) | public void setAdmin(boolean admin) {
    method toString (line 41) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/FileDTO.java
  class FileDTO (line 9) | public class FileDTO {
    method getId (line 31) | public String getId() {
    method setId (line 35) | public void setId(String id) {
    method getName (line 39) | public String getName() {
    method setName (line 43) | public void setName(String name) {
    method getExtension (line 47) | public String getExtension() {
    method setExtension (line 51) | public void setExtension(String extension) {
    method getSize (line 55) | public int getSize() {
    method setSize (line 59) | public void setSize(int size) {
    method getMimeType (line 63) | public String getMimeType() {
    method setMimeType (line 67) | public void setMimeType(String mimeType) {
    method getWidth (line 71) | public int getWidth() {
    method setWidth (line 75) | public void setWidth(int width) {
    method getHeight (line 79) | public int getHeight() {
    method setHeight (line 83) | public void setHeight(int height) {
    method getThumbWidth (line 87) | public short getThumbWidth() {
    method setThumbWidth (line 91) | public void setThumbWidth(short thumbWidth) {
    method getThumbHeight (line 95) | public short getThumbHeight() {
    method setThumbHeight (line 99) | public void setThumbHeight(short thumbHeight) {
    method getPath (line 103) | public String getPath() {
    method setPath (line 107) | public void setPath(String path) {
    method toString (line 111) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/MessageDTO.java
  class MessageDTO (line 9) | public class MessageDTO {
    method getId (line 55) | public long getId() {
    method setId (line 59) | public void setId(long id) {
    method getChannelId (line 63) | public String getChannelId() {
    method setChannelId (line 67) | public void setChannelId(String channelId) {
    method getChannelType (line 71) | public String getChannelType() {
    method setChannelType (line 75) | public void setChannelType(String channelType) {
    method getCreateAt (line 79) | public long getCreateAt() {
    method setCreateAt (line 83) | public void setCreateAt(long createAt) {
    method getType (line 87) | public String getType() {
    method setType (line 91) | public void setType(String type) {
    method getSenderId (line 95) | public String getSenderId() {
    method setSenderId (line 99) | public void setSenderId(String senderId) {
    method getSenderName (line 103) | public String getSenderName() {
    method setSenderName (line 107) | public void setSenderName(String senderName) {
    method getSenderNickname (line 111) | public String getSenderNickname() {
    method setSenderNickname (line 115) | public void setSenderNickname(String senderNickname) {
    method getSenderOnlineStatus (line 119) | public String getSenderOnlineStatus() {
    method setSenderOnlineStatus (line 123) | public void setSenderOnlineStatus(String senderOnlineStatus) {
    method getSenderAvatarUrl (line 127) | public String getSenderAvatarUrl() {
    method setSenderAvatarUrl (line 131) | public void setSenderAvatarUrl(String senderAvatarUrl) {
    method getSenderFirstLetterOfName (line 135) | public String getSenderFirstLetterOfName() {
    method setSenderFirstLetterOfName (line 139) | public void setSenderFirstLetterOfName(String senderFirstLetterOfName) {
    method getContent (line 143) | public String getContent() {
    method setContent (line 147) | public void setContent(String content) {
    method getFileMimeType (line 151) | public String getFileMimeType() {
    method setFileMimeType (line 155) | public void setFileMimeType(String fileMimeType) {
    method getImageWidth (line 159) | public int getImageWidth() {
    method setImageWidth (line 163) | public void setImageWidth(int imageWidth) {
    method getImageHeight (line 167) | public int getImageHeight() {
    method setImageHeight (line 171) | public void setImageHeight(int imageHeight) {
    method getImageThumbWidth (line 175) | public short getImageThumbWidth() {
    method setImageThumbWidth (line 179) | public void setImageThumbWidth(short imageThumbWidth) {
    method getImageThumbHeight (line 183) | public short getImageThumbHeight() {
    method setImageThumbHeight (line 187) | public void setImageThumbHeight(short imageThumbHeight) {
    method getFileId (line 191) | public String getFileId() {
    method setFileId (line 195) | public void setFileId(String fileId) {
    method getFileName (line 199) | public String getFileName() {
    method setFileName (line 203) | public void setFileName(String fileName) {
    method getFileExtension (line 207) | public String getFileExtension() {
    method setFileExtension (line 211) | public void setFileExtension(String fileExtension) {
    method getFileSize (line 215) | public int getFileSize() {
    method setFileSize (line 219) | public void setFileSize(int fileSize) {
    method getFilePath (line 223) | public String getFilePath() {
    method setFilePath (line 227) | public void setFilePath(String filePath) {
    method getSenderRealAvatarUrl (line 231) | public String getSenderRealAvatarUrl() {
    method toString (line 241) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/UserChannelDTO.java
  class UserChannelDTO (line 9) | public class UserChannelDTO {
    method getChannelId (line 31) | public String getChannelId() {
    method setChannelId (line 35) | public void setChannelId(String channelId) {
    method getChannelName (line 39) | public String getChannelName() {
    method setChannelName (line 43) | public void setChannelName(String channelName) {
    method getChannelType (line 47) | public String getChannelType() {
    method setChannelType (line 51) | public void setChannelType(String channelType) {
    method getChannelDisplayName (line 55) | public String getChannelDisplayName() {
    method setChannelDisplayName (line 59) | public void setChannelDisplayName(String channelDisplayName) {
    method getChannelDescription (line 63) | public String getChannelDescription() {
    method setChannelDescription (line 67) | public void setChannelDescription(String channelDescription) {
    method getToUserId (line 71) | public String getToUserId() {
    method setToUserId (line 75) | public void setToUserId(String toUserId) {
    method getToUserOnlineStatus (line 79) | public String getToUserOnlineStatus() {
    method setToUserOnlineStatus (line 83) | public void setToUserOnlineStatus(String toUserOnlineStatus) {
    method getUnreadMessageCount (line 87) | public short getUnreadMessageCount() {
    method setUnreadMessageCount (line 91) | public void setUnreadMessageCount(short unreadMessageCount) {
    method getMemberCount (line 95) | public int getMemberCount() {
    method setMemberCount (line 99) | public void setMemberCount(int memberCount) {
    method getCreatorId (line 103) | public String getCreatorId() {
    method setCreatorId (line 107) | public void setCreatorId(String creatorId) {
    method toString (line 111) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/dto/UserDTO.java
  class UserDTO (line 9) | public class UserDTO {
    method getId (line 29) | public String getId() {
    method setId (line 33) | public void setId(String id) {
    method getName (line 37) | public String getName() {
    method setName (line 41) | public void setName(String name) {
    method getFirstLetterOfName (line 45) | public String getFirstLetterOfName() {
    method setFirstLetterOfName (line 49) | public void setFirstLetterOfName(String firstLetterOfName) {
    method getNickname (line 53) | public String getNickname() {
    method setNickname (line 57) | public void setNickname(String nickname) {
    method getPassword (line 61) | public String getPassword() {
    method setPassword (line 65) | public void setPassword(String password) {
    method getAvatarUrl (line 69) | public String getAvatarUrl() {
    method setAvatarUrl (line 73) | public void setAvatarUrl(String avatarUrl) {
    method getLocked (line 77) | public Boolean getLocked() {
    method setLocked (line 81) | public void setLocked(Boolean locked) {
    method getLastPostAt (line 85) | public Long getLastPostAt() {
    method setLastPostAt (line 89) | public void setLastPostAt(Long lastPostAt) {
    method getOnlineStatus (line 93) | public String getOnlineStatus() {
    method setOnlineStatus (line 97) | public void setOnlineStatus(String onlineStatus) {
    method toString (line 101) | @Override

FILE: leo-im-api/src/main/java/org/leo/im/api/exception/ServiceException.java
  class ServiceException (line 9) | public final class ServiceException extends RuntimeException {
    method ServiceException (line 13) | public ServiceException() {
    method ServiceException (line 16) | public ServiceException(String message) {
    method ServiceException (line 20) | public ServiceException(String message, Throwable cause) {
    method ServiceException (line 24) | public ServiceException(Throwable cause) {

FILE: leo-im-api/src/main/java/org/leo/im/api/service/ChannelService.java
  type ChannelService (line 18) | public interface ChannelService {
    method listChannel (line 26) | List<ChannelListDTO> listChannel(Map<String, Object> parameters, int l...
    method listGroupChannel (line 34) | List<ChannelListDTO> listGroupChannel(Map<String, Object> parameters, ...
    method saveChannel (line 42) | @Transactional
    method getById (line 50) | ChannelDTO getById(String id);
    method isAdmin (line 58) | boolean isAdmin(String userId, String channelId);
    method updateName (line 66) | @Transactional
    method updatePurpose (line 75) | @Transactional
    method addMember (line 86) | @Transactional
    method removeMember (line 97) | @Transactional
    method listMember (line 108) | Page<ChannelMemberDTO> listMember(String channelId, String username, i...
    method changeAdmin (line 117) | @Transactional
    method leaveChannel (line 127) | @Transactional
    method removeChannel (line 136) | @Transactional

FILE: leo-im-api/src/main/java/org/leo/im/api/service/MessageService.java
  type MessageService (line 15) | public interface MessageService {
    method listMessage (line 24) | List<MessageDTO> listMessage(String channelId, long maxCreateAt, int l...
    method getById (line 31) | MessageDTO getById(long id);
    method saveMessage (line 38) | @Transactional
    method saveMessage (line 46) | @Transactional
    method readMessage (line 56) | @Transactional
    method removeMessage (line 67) | @Transactional
    method saveFile (line 75) | @Transactional

FILE: leo-im-api/src/main/java/org/leo/im/api/service/UnreadMessageCountService.java
  type UnreadMessageCountService (line 10) | public interface UnreadMessageCountService {
    method batchSaveUnreadMessageCount (line 19) | @Transactional
    method updateUnreadMessageCount (line 29) | @Transactional
    method batchUpdateUnreadMessageCount (line 39) | int batchUpdateUnreadMessageCount(String[] userIds, String channelId, ...
    method batchIncreaseUnreadMessageCount (line 48) | @Transactional
    method increaseUnreadMessageCount (line 58) | @Transactional

FILE: leo-im-api/src/main/java/org/leo/im/api/service/UserChannelService.java
  type UserChannelService (line 14) | public interface UserChannelService {
    method listUserChannel (line 23) | List<UserChannelDTO> listUserChannel(String userId, String type, int l...
    method get (line 31) | UserChannelDTO get(String userId, String channelId);
    method updateDisplayName (line 40) | @Transactional
    method hideChannel (line 49) | @Transactional
    method listByName (line 59) | List<UserChannelDTO> listByName(String userId, String name, String type);

FILE: leo-im-api/src/main/java/org/leo/im/api/service/UserService.java
  type UserService (line 15) | public interface UserService {
    method verifyLogin (line 24) | UserDTO verifyLogin(String loginName, String password);
    method getById (line 32) | UserDTO getById(String id);
    method saveUser (line 40) | @Transactional
    method listByNameOrNickname (line 51) | Page<UserDTO> listByNameOrNickname(String name, int limit, int offset);
    method updateUser (line 59) | @Transactional
    method listNonMembers (line 70) | Page<UserDTO> listNonMembers(String channelId, String username, int li...
    method batchOffline (line 77) | @Transactional
    method updatePassword (line 88) | @Transactional

FILE: leo-im-api/src/test/java/org/leo/im/api/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-common/src/main/java/org/leo/im/common/data/Page.java
  class Page (line 12) | public final class Page<T> implements java.io.Serializable {
    method Page (line 20) | public Page(long total, List<T> rows) {
    method getTotal (line 25) | public long getTotal() {
    method getRows (line 29) | public List<T> getRows() {

FILE: leo-im-common/src/test/java/org/leo/im/common/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-http/src/main/java/org/leo/im/http/HttpServer.java
  class HttpServer (line 14) | public final class HttpServer {
    method start (line 20) | public void start() throws InterruptedException {

FILE: leo-im-http/src/main/java/org/leo/im/http/cache/Cache.java
  class Cache (line 9) | final class Cache {
    method Cache (line 20) | public Cache(Object value) {
    method Cache (line 24) | public Cache(Object value, int timeout) {
    method getValue (line 30) | public Object getValue() {
    method setValue (line 33) | public void setValue(Object value) {
    method getTimeout (line 37) | public int getTimeout() {
    method setTimeout (line 40) | public void setTimeout(int timeout) {
    method getExpireAt (line 45) | public long getExpireAt() {

FILE: leo-im-http/src/main/java/org/leo/im/http/cache/CacheManager.java
  type CacheManager (line 9) | public interface CacheManager {
    method get (line 16) | Object get(String key);
    method put (line 23) | void put(String key, Object value);
    method put (line 31) | void put(String key, Object value, int timeout);
    method remove (line 37) | void remove(String key);
    method clear (line 42) | void clear();
    method clearExpired (line 47) | void clearExpired();

FILE: leo-im-http/src/main/java/org/leo/im/http/cache/CacheManagerFactory.java
  class CacheManagerFactory (line 9) | public final class CacheManagerFactory {
    method getCacheManager (line 16) | public static CacheManager getCacheManager() {

FILE: leo-im-http/src/main/java/org/leo/im/http/cache/MapCacheManager.java
  class MapCacheManager (line 16) | final class MapCacheManager implements CacheManager {
    method MapCacheManager (line 22) | private MapCacheManager() {
    class InstanceHolder (line 26) | public static class InstanceHolder {
    method getInstance (line 33) | public static MapCacheManager getInstance() {
    method get (line 42) | @Override
    method put (line 54) | @Override
    method put (line 68) | @Override
    method remove (line 79) | @Override
    method clear (line 87) | @Override
    method clearExpired (line 95) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/constant/CacheKeys.java
  class CacheKeys (line 9) | public final class CacheKeys {

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/AuthController.java
  class AuthController (line 37) | @RestController
    method login (line 61) | @PostMapping("/login")
    method getVerificationCode (line 121) | @GetMapping("/verificationCode")
    method getJSessionId (line 140) | private String getJSessionId(FullHttpRequest request) {

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/BaseController.java
  class BaseController (line 15) | public class BaseController {
    method getSubjectFromJwt (line 24) | protected String getSubjectFromJwt(String jwt, String key) {
    method verifyJwt (line 40) | protected boolean verifyJwt(String jwt) {

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/ChannelController.java
  class ChannelController (line 36) | @RestController
    method createChannel (line 40) | @PostMapping("")
    method getById (line 91) | @GetMapping("/{id}")
    method isAdmin (line 104) | @GetMapping("/{channelId}/isAdmin")
    method updateChannel (line 112) | @PatchMapping("/{channelId}")
    method listMember (line 129) | @GetMapping("/{channelId}/members")
    method addMember (line 137) | @PostMapping("/{channelId}/members")
    method removeMember (line 152) | @DeleteMapping("/{channelId}/members")
    method changeAdmin (line 164) | @PutMapping("/{channelId}/admin")
    method leaveChannel (line 178) | @DeleteMapping("/{channelId}/members/{memberId}")
    method removeChannel (line 187) | @DeleteMapping("/{channelId}")
    method getChannelDisplayName (line 201) | private String getChannelDisplayName(ChannelDTO dto, String creatorId) {

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/ExceptionController.java
  class ExceptionController (line 15) | public class ExceptionController implements ExceptionHandler {
    method doHandle (line 22) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/MessageController.java
  class MessageController (line 43) | @RestController()
    method listMessage (line 47) | @GetMapping("")
    method saveMessage (line 61) | @PostMapping("")
    method readMessage (line 84) | @PostMapping("/read")
    method removeMessage (line 93) | @DeleteMapping("")
    method uploadFile (line 106) | @PostMapping("/files")
    method getFile (line 156) | @GetMapping("/files")
    method isImage (line 169) | private boolean isImage(String fileType) {
    method getThumbWidth (line 184) | private short getThumbWidth(int width) {
    method getThumbHeight (line 196) | private short getThumbHeight(int height) {
    method getFileExtension (line 208) | private String getFileExtension(String fileName) {

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/UserChannelController.java
  class UserChannelController (line 23) | @RestController
    method listUserChannel (line 27) | @GetMapping("/{userId}")
    method getUserChannel (line 44) | @GetMapping("")
    method updateDisplayName (line 62) | @PatchMapping("/{channelId}")
    method hideChannel (line 77) | @PostMapping("/{channelId}/hiding")
    method listUserChannelByName (line 91) | @GetMapping("/{userId}/search")

FILE: leo-im-http/src/main/java/org/leo/im/http/controller/UserController.java
  class UserController (line 44) | @RestController()
    method getById (line 48) | @GetMapping("/{id}")
    method getCurrentUser (line 55) | @GetMapping("/me")
    method register (line 63) | @PostMapping("")
    method listUser (line 93) | @GetMapping("")
    method patchUser (line 101) | @PatchMapping("/{id}")
    method uploadAvatar (line 129) | @PostMapping("/me/avatar")
    method getMyAvatar (line 145) | @GetMapping("/{id}/avatar")
    method listNonChannelMember (line 164) | @GetMapping("/nonChannelMembers")
    method changePassword (line 172) | @PutMapping("/{userId}/password")
    method getJSessionId (line 189) | private String getJSessionId(FullHttpRequest request) {

FILE: leo-im-http/src/main/java/org/leo/im/http/exception/NoSuchSettingException.java
  class NoSuchSettingException (line 9) | public final class NoSuchSettingException extends RuntimeException {
    method NoSuchSettingException (line 13) | public NoSuchSettingException() {
    method NoSuchSettingException (line 16) | public NoSuchSettingException(String message) {
    method NoSuchSettingException (line 20) | public NoSuchSettingException(String message, Throwable cause) {
    method NoSuchSettingException (line 24) | public NoSuchSettingException(Throwable cause) {

FILE: leo-im-http/src/main/java/org/leo/im/http/file/AbstractLocalFileStorage.java
  class AbstractLocalFileStorage (line 12) | abstract class AbstractLocalFileStorage {
    method readFile (line 19) | public RandomAccessFile readFile(String fileName) {

FILE: leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorage.java
  type AvatarStorage (line 11) | public interface AvatarStorage {
    method save (line 22) | boolean save(String userId, String fileType, byte[] data, int width, i...
    method read (line 32) | RandomAccessFile read(String userId, String fileName, int width, int h...

FILE: leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorageFactory.java
  class AvatarStorageFactory (line 9) | public final class AvatarStorageFactory {
    method newInstance (line 15) | public static AvatarStorage newInstance() {

FILE: leo-im-http/src/main/java/org/leo/im/http/file/FileStorage.java
  type FileStorage (line 11) | public interface FileStorage {
    method save (line 20) | boolean save(String key, String fileName, byte[] data);
    method saveThumb (line 31) | short[] saveThumb(String key, String fileName, byte[] data, int width,...
    method read (line 38) | RandomAccessFile read(String fileName);

FILE: leo-im-http/src/main/java/org/leo/im/http/file/FileStorageFactory.java
  class FileStorageFactory (line 8) | public final class FileStorageFactory {
    method newInstance (line 14) | public static FileStorage newInstance() {

FILE: leo-im-http/src/main/java/org/leo/im/http/file/LocalAvatarStorage.java
  class LocalAvatarStorage (line 22) | class LocalAvatarStorage extends AbstractLocalFileStorage implements Ava...
    method save (line 35) | @Override
    method read (line 70) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/file/LocalFileStorage.java
  class LocalFileStorage (line 28) | class LocalFileStorage extends AbstractLocalFileStorage implements FileS...
    method save (line 38) | @Override
    method saveThumb (line 86) | @Override
    method read (line 115) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/interceptor/AuthenticationInterceptor.java
  class AuthenticationInterceptor (line 16) | public class AuthenticationInterceptor implements Interceptor {
    method preHandle (line 18) | @Override
    method postHandle (line 32) | @Override
    method afterCompletion (line 36) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/interceptor/CorsInterceptor.java
  class CorsInterceptor (line 14) | public final class CorsInterceptor implements Interceptor {
    method preHandle (line 16) | @Override
    method postHandle (line 28) | @Override
    method afterCompletion (line 32) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/util/JwtUtils.java
  class JwtUtils (line 20) | public class JwtUtils {
    method generalKey (line 28) | private static SecretKey generalKey(String secret) {
    method createJWT (line 42) | public static String createJWT(String subject, String secret, long ttl...
    method parseJWT (line 65) | public static Claims parseJWT(String jwt, String secret) {

FILE: leo-im-http/src/main/java/org/leo/im/http/vo/ChannelListVO.java
  class ChannelListVO (line 9) | public final class ChannelListVO {
    method getId (line 21) | public String getId() {
    method setId (line 25) | public void setId(String id) {
    method getName (line 29) | public String getName() {
    method setName (line 33) | public void setName(String name) {
    method getDisplayName (line 37) | public String getDisplayName() {
    method setDisplayName (line 41) | public void setDisplayName(String displayName) {
    method getOtherSideOnlineStatus (line 45) | public String getOtherSideOnlineStatus() {
    method setOtherSideOnlineStatus (line 49) | public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
    method getType (line 53) | public String getType() {
    method setType (line 57) | public void setType(String type) {
    method toString (line 61) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/vo/ChannelVO.java
  class ChannelVO (line 13) | public final class ChannelVO {
    method getId (line 33) | public String getId() {
    method setId (line 37) | public void setId(String id) {
    method getName (line 41) | public String getName() {
    method setName (line 45) | public void setName(String name) {
    method getDisplayName (line 49) | public String getDisplayName() {
    method setDisplayName (line 53) | public void setDisplayName(String displayName) {
    method getType (line 57) | public String getType() {
    method setType (line 61) | public void setType(String type) {
    method getMemberCount (line 65) | public int getMemberCount() {
    method setMemberCount (line 69) | public void setMemberCount(int memberCount) {
    method getOtherSideId (line 73) | public String getOtherSideId() {
    method setOtherSideId (line 77) | public void setOtherSideId(String otherSideId) {
    method getOtherSideOnlineStatus (line 81) | public String getOtherSideOnlineStatus() {
    method setOtherSideOnlineStatus (line 85) | public void setOtherSideOnlineStatus(String otherSideOnlineStatus) {
    method getCreatorId (line 89) | public String getCreatorId() {
    method setCreatorId (line 93) | public void setCreatorId(String creatorId) {
    method getMembers (line 97) | public List<ChannelMemberDTO> getMembers() {
    method toString (line 101) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/vo/MessageVO.java
  class MessageVO (line 9) | public final class MessageVO {
    method getId (line 53) | public long getId() {
    method setId (line 57) | public void setId(long id) {
    method getChannelId (line 61) | public String getChannelId() {
    method setChannelId (line 65) | public void setChannelId(String channelId) {
    method getCreateAt (line 69) | public long getCreateAt() {
    method setCreateAt (line 73) | public void setCreateAt(long createAt) {
    method getType (line 77) | public String getType() {
    method setType (line 81) | public void setType(String type) {
    method getSenderId (line 85) | public String getSenderId() {
    method setSenderId (line 89) | public void setSenderId(String senderId) {
    method getSenderName (line 93) | public String getSenderName() {
    method setSenderName (line 97) | public void setSenderName(String senderName) {
    method getSenderNickname (line 101) | public String getSenderNickname() {
    method setSenderNickname (line 105) | public void setSenderNickname(String senderNickname) {
    method getSenderOnlineStatus (line 109) | public String getSenderOnlineStatus() {
    method setSenderOnlineStatus (line 113) | public void setSenderOnlineStatus(String senderOnlineStatus) {
    method getSenderAvatarUrl (line 117) | public String getSenderAvatarUrl() {
    method setSenderAvatarUrl (line 121) | public void setSenderAvatarUrl(String senderAvatarUrl) {
    method getSenderFirstLetterOfName (line 125) | public String getSenderFirstLetterOfName() {
    method setSenderFirstLetterOfName (line 129) | public void setSenderFirstLetterOfName(String senderFirstLetterOfName) {
    method getContent (line 133) | public String getContent() {
    method setContent (line 137) | public void setContent(String content) {
    method getFileName (line 141) | public String getFileName() {
    method setFileName (line 145) | public void setFileName(String fileName) {
    method getFileExtension (line 149) | public String getFileExtension() {
    method setFileExtension (line 153) | public void setFileExtension(String fileExtension) {
    method getFileSize (line 157) | public int getFileSize() {
    method setFileSize (line 161) | public void setFileSize(int fileSize) {
    method getFileMimeType (line 165) | public String getFileMimeType() {
    method setFileMimeType (line 169) | public void setFileMimeType(String fileMimeType) {
    method getFileThumbPath (line 173) | public String getFileThumbPath() {
    method setFileThumbPath (line 177) | public void setFileThumbPath(String fileThumbPath) {
    method getFilePath (line 181) | public String getFilePath() {
    method setFilePath (line 185) | public void setFilePath(String filePath) {
    method getImageWidth (line 189) | public int getImageWidth() {
    method setImageWidth (line 193) | public void setImageWidth(int imageWidth) {
    method getImageHeight (line 197) | public int getImageHeight() {
    method setImageHeight (line 201) | public void setImageHeight(int imageHeight) {
    method getImageThumbWidth (line 205) | public short getImageThumbWidth() {
    method setImageThumbWidth (line 209) | public void setImageThumbWidth(short imageThumbWidth) {
    method getImageThumbHeight (line 213) | public short getImageThumbHeight() {
    method setImageThumbHeight (line 217) | public void setImageThumbHeight(short imageThumbHeight) {
    method getSenderRealAvatarUrl (line 221) | public String getSenderRealAvatarUrl() {
    method toString (line 231) | @Override

FILE: leo-im-http/src/main/java/org/leo/im/http/vo/UserChannelVO.java
  class UserChannelVO (line 9) | public final class UserChannelVO {
    method getChannelId (line 31) | public String getChannelId() {
    method setChannelId (line 35) | public void setChannelId(String channelId) {
    method getChannelName (line 39) | public String getChannelName() {
    method setChannelName (line 43) | public void setChannelName(String channelName) {
    method getChannelType (line 47) | public String getChannelType() {
    method setChannelType (line 51) | public void setChannelType(String channelType) {
    method getChannelDisplayName (line 55) | public String getChannelDisplayName() {
    method setChannelDisplayName (line 59) | public void setChannelDisplayName(String channelDisplayName) {
    method getChannelDescription (line 63) | public String getChannelDescription() {
    method setChannelDescription (line 67) | public void setChannelDescription(String channelDescription) {
    method getToUserId (line 71) | public String getToUserId() {
    method setToUserId (line 75) | public void setToUserId(String toUserId) {
    method getToUserOnlineStatus (line 79) | public String getToUserOnlineStatus() {
    method setToUserOnlineStatus (line 83) | public void setToUserOnlineStatus(String toUserOnlineStatus) {
    method getUnreadMessageCount (line 87) | public short getUnreadMessageCount() {
    method setUnreadMessageCount (line 91) | public void setUnreadMessageCount(short unreadMessageCount) {
    method getMemberCount (line 95) | public int getMemberCount() {
    method setMemberCount (line 99) | public void setMemberCount(int memberCount) {
    method getCreatorId (line 103) | public String getCreatorId() {
    method setCreatorId (line 107) | public void setCreatorId(String creatorId) {
    method toString (line 111) | @Override

FILE: leo-im-http/src/test/java/org/leo/im/http/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-migration/src/main/java/org/leo/im/migration/FlywayMigration.java
  class FlywayMigration (line 5) | public class FlywayMigration {
    method migrate (line 13) | public void migrate(String url, String user, String password) {

FILE: leo-im-migration/src/main/resources/db/migration/V20180615___Init.sql
  type `im_channel` (line 1) | CREATE TABLE IF NOT EXISTS `im_channel` (
  type `im_channel_member` (line 16) | CREATE TABLE IF NOT EXISTS `im_channel_member` (
  type `im_file` (line 23) | CREATE TABLE IF NOT EXISTS `im_file` (
  type `im_hide_channel` (line 37) | CREATE TABLE IF NOT EXISTS `im_hide_channel` (
  type `im_message` (line 43) | CREATE TABLE IF NOT EXISTS `im_message` (
  type `im_unread_message_count` (line 55) | CREATE TABLE IF NOT EXISTS `im_unread_message_count` (
  type `im_user` (line 62) | CREATE TABLE IF NOT EXISTS `im_user` (
  type `im_user_channel` (line 77) | CREATE TABLE IF NOT EXISTS `im_user_channel` (

FILE: leo-im-migration/src/test/java/org/leo/im/migration/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-migration/target/classes/db/migration/V20180615___Init.sql
  type `im_channel` (line 1) | CREATE TABLE IF NOT EXISTS `im_channel` (
  type `im_channel_member` (line 16) | CREATE TABLE IF NOT EXISTS `im_channel_member` (
  type `im_file` (line 23) | CREATE TABLE IF NOT EXISTS `im_file` (
  type `im_hide_channel` (line 37) | CREATE TABLE IF NOT EXISTS `im_hide_channel` (
  type `im_message` (line 43) | CREATE TABLE IF NOT EXISTS `im_message` (
  type `im_unread_message_count` (line 55) | CREATE TABLE IF NOT EXISTS `im_unread_message_count` (
  type `im_user` (line 62) | CREATE TABLE IF NOT EXISTS `im_user` (
  type `im_user_channel` (line 77) | CREATE TABLE IF NOT EXISTS `im_user_channel` (

FILE: leo-im-model/src/main/java/org/leo/im/model/Channel.java
  class Channel (line 12) | public final class Channel {
    method getId (line 42) | public String getId() {
    method setId (line 46) | public void setId(String id) {
    method getName (line 50) | public String getName() {
    method setName (line 54) | public void setName(String name) {
    method getFrom (line 58) | public User getFrom() {
    method setFrom (line 62) | public void setFrom(User from) {
    method getTo (line 66) | public User getTo() {
    method setTo (line 70) | public void setTo(User to) {
    method getType (line 74) | public String getType() {
    method setType (line 78) | public void setType(String type) {
    method getPurpose (line 82) | public String getPurpose() {
    method setPurpose (line 86) | public void setPurpose(String purpose) {
    method getCreateAt (line 90) | public long getCreateAt() {
    method setCreateAt (line 94) | public void setCreateAt(long createAt) {
    method getDeleteAt (line 98) | public long getDeleteAt() {
    method setDeleteAt (line 102) | public void setDeleteAt(long deleteAt) {
    method getLastPostAt (line 106) | public long getLastPostAt() {
    method setLastPostAt (line 110) | public void setLastPostAt(long lastPostAt) {
    method getMemberCount (line 114) | public int getMemberCount() {
    method setMemberCount (line 118) | public void setMemberCount(int memberCount) {
    method getCreator (line 122) | public User getCreator() {
    method setCreator (line 126) | public void setCreator(User creator) {
    method getMembers (line 130) | public List<ChannelMember> getMembers() {
    method toString (line 134) | @Override

FILE: leo-im-model/src/main/java/org/leo/im/model/ChannelMember.java
  class ChannelMember (line 9) | public final class ChannelMember {
    method getUser (line 15) | public User getUser() {
    method setUser (line 18) | public void setUser(User user) {
    method getAdmin (line 22) | public boolean getAdmin() {
    method setAdmin (line 25) | public void setAdmin(boolean admin) {
    method toString (line 29) | @Override

FILE: leo-im-model/src/main/java/org/leo/im/model/File.java
  class File (line 9) | public class File {
    method getId (line 31) | public String getId() {
    method setId (line 35) | public void setId(String id) {
    method getName (line 39) | public String getName() {
    method setName (line 43) | public void setName(String name) {
    method getExtension (line 47) | public String getExtension() {
    method setExtension (line 51) | public void setExtension(String extension) {
    method getSize (line 55) | public int getSize() {
    method setSize (line 59) | public void setSize(int size) {
    method getMimeType (line 63) | public String getMimeType() {
    method setMimeType (line 67) | public void setMimeType(String mimeType) {
    method getWidth (line 71) | public int getWidth() {
    method setWidth (line 75) | public void setWidth(int width) {
    method getHeight (line 79) | public int getHeight() {
    method setHeight (line 83) | public void setHeight(int height) {
    method getThumbWidth (line 87) | public short getThumbWidth() {
    method setThumbWidth (line 91) | public void setThumbWidth(short thumbWidth) {
    method getThumbHeight (line 95) | public short getThumbHeight() {
    method setThumbHeight (line 99) | public void setThumbHeight(short thumbHeight) {
    method getPath (line 103) | public String getPath() {
    method setPath (line 107) | public void setPath(String path) {
    method toString (line 111) | @Override

FILE: leo-im-model/src/main/java/org/leo/im/model/Message.java
  class Message (line 9) | public final class Message {
    method getId (line 28) | public long getId() {
    method setId (line 32) | public void setId(long id) {
    method getChannel (line 36) | public Channel getChannel() {
    method setChannel (line 40) | public void setChannel(Channel channel) {
    method getSender (line 44) | public User getSender() {
    method setSender (line 48) | public void setSender(User sender) {
    method getCreateAt (line 52) | public long getCreateAt() {
    method setCreateAt (line 56) | public void setCreateAt(long createAt) {
    method getType (line 60) | public String getType() {
    method setType (line 64) | public void setType(String type) {
    method getContent (line 68) | public String getContent() {
    method setContent (line 72) | public void setContent(String content) {
    method getFile (line 76) | public File getFile() {
    method setFile (line 80) | public void setFile(File file) {
    method toString (line 84) | @Override

FILE: leo-im-model/src/main/java/org/leo/im/model/User.java
  class User (line 11) | public final class User {
    method getId (line 35) | public String getId() {
    method setId (line 38) | public void setId(String id) {
    method getName (line 42) | public String getName() {
    method setName (line 45) | public void setName(String name) {
    method getFirstLetterOfName (line 49) | public String getFirstLetterOfName() {
    method setFirstLetterOfName (line 52) | public void setFirstLetterOfName(String firstLetter) {
    method getNickname (line 56) | public String getNickname() {
    method setNickname (line 59) | public void setNickname(String nickname) {
    method getSalt (line 63) | public String getSalt() {
    method setSalt (line 66) | public void setSalt(String salt) {
    method getPassword (line 70) | public String getPassword() {
    method setPassword (line 73) | public void setPassword(String password) {
    method getLocked (line 77) | public Boolean getLocked() {
    method setLocked (line 80) | public void setLocked(Boolean locked) {
    method getCreatedAt (line 84) | public Date getCreatedAt() {
    method setCreatedAt (line 87) | public void setCreatedAt(Date createdAt) {
    method getLastPostAt (line 91) | public long getLastPostAt() {
    method setLastPostAt (line 94) | public void setLastPostAt(long lastPostAt) {
    method getAvatarUrl (line 98) | public String getAvatarUrl() {
    method setAvatarUrl (line 101) | public void setAvatarUrl(String avatarUr) {
    method getOnlineStatus (line 105) | public String getOnlineStatus() {
    method setOnlineStatus (line 108) | public void setOnlineStatus(String onlineStatus) {
    method toString (line 112) | @Override

FILE: leo-im-model/src/main/java/org/leo/im/model/UserChannel.java
  class UserChannel (line 9) | public final class UserChannel {
    method getUser (line 21) | public User getUser() {
    method setUser (line 25) | public void setUser(User user) {
    method getChannel (line 29) | public Channel getChannel() {
    method setChannel (line 33) | public void setChannel(Channel channel) {
    method getDisplayName (line 37) | public String getDisplayName() {
    method setDisplayName (line 41) | public void setDisplayName(String displayName) {
    method getToUser (line 45) | public User getToUser() {
    method setToUser (line 49) | public void setToUser(User toUser) {
    method getUnreadMessageCount (line 53) | public short getUnreadMessageCount() {
    method setUnreadMessageCount (line 57) | public void setUnreadMessageCount(short unreadMessageCount) {
    method toString (line 61) | @Override

FILE: leo-im-model/src/test/java/org/leo/im/model/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-notification/src/main/java/org/leo/im/notification/ActionNames.java
  class ActionNames (line 9) | public class ActionNames {

FILE: leo-im-notification/src/main/java/org/leo/im/notification/PublishKeys.java
  class PublishKeys (line 9) | public class PublishKeys {

FILE: leo-im-notification/src/main/java/org/leo/im/notification/Publisher.java
  type Publisher (line 9) | public interface Publisher {
    method publish (line 16) | void publish(String channel, String message);
    method subscribe (line 23) | void subscribe(Subscriber subscriber, String... channels);

FILE: leo-im-notification/src/main/java/org/leo/im/notification/PublisherFactory.java
  class PublisherFactory (line 12) | public class PublisherFactory {
    method createPublisher (line 19) | public static Publisher createPublisher() {

FILE: leo-im-notification/src/main/java/org/leo/im/notification/QueuePublisher.java
  class QueuePublisher (line 17) | public class QueuePublisher implements Publisher {
    method QueuePublisher (line 33) | private QueuePublisher() {
    class InstanceHolder (line 37) | private static class InstanceHolder {
    method getInstance (line 41) | public static QueuePublisher getInstance() {
    method publish (line 51) | @Override
    method subscribe (line 74) | @Override
    method takeFromQueue (line 101) | private String takeFromQueue(BlockingQueue<String> subscribeQueue) {

FILE: leo-im-notification/src/main/java/org/leo/im/notification/Subscriber.java
  type Subscriber (line 9) | public interface Subscriber {
    method onMessage (line 16) | void onMessage(String channel, String message);

FILE: leo-im-notification/src/main/java/org/leo/im/notification/ThreadPoolHolder.java
  class ThreadPoolHolder (line 16) | public class ThreadPoolHolder {
    method newThread (line 34) | @Override
    method getThreadPool (line 45) | public static ExecutorService getThreadPool() {

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/AvatarChangedEvent.java
  class AvatarChangedEvent (line 15) | public class AvatarChangedEvent implements NotificationEvent {
    method AvatarChangedEvent (line 21) | public AvatarChangedEvent(String userId, String avatar) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelCreatedEvent.java
  class ChannelCreatedEvent (line 15) | public class ChannelCreatedEvent implements NotificationEvent {
    method ChannelCreatedEvent (line 21) | public ChannelCreatedEvent(String channelId, String userIds) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelNameChangedEvent.java
  class ChannelNameChangedEvent (line 15) | public class ChannelNameChangedEvent implements NotificationEvent {
    method ChannelNameChangedEvent (line 21) | public ChannelNameChangedEvent(String channelId, String channelName) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelRemovedEvent.java
  class ChannelRemovedEvent (line 15) | public class ChannelRemovedEvent implements NotificationEvent {
    method ChannelRemovedEvent (line 19) | public ChannelRemovedEvent(String channelId) {
    method trigger (line 23) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/JoinChannelEvent.java
  class JoinChannelEvent (line 16) | public class JoinChannelEvent implements NotificationEvent {
    method JoinChannelEvent (line 28) | public JoinChannelEvent(String channelId, String[] userIds, String[] u...
    method trigger (line 36) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/LeaveChannelEvent.java
  class LeaveChannelEvent (line 15) | public class LeaveChannelEvent implements NotificationEvent {
    method LeaveChannelEvent (line 25) | public LeaveChannelEvent(String channelId, String userId, String userN...
    method trigger (line 35) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/MembersCountChangedEvent.java
  class MembersCountChangedEvent (line 15) | public class MembersCountChangedEvent implements NotificationEvent {
    method MembersCountChangedEvent (line 21) | public MembersCountChangedEvent(String channelId, int count) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/MessageRemovedEvent.java
  class MessageRemovedEvent (line 14) | public class MessageRemovedEvent implements NotificationEvent {
    method MessageRemovedEvent (line 24) | public MessageRemovedEvent(long messageId, String senderId, String cha...
    method trigger (line 34) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/NewMessageEvent.java
  class NewMessageEvent (line 15) | public class NewMessageEvent implements NotificationEvent {
    method NewMessageEvent (line 19) | public NewMessageEvent(JSONObject message) {
    method trigger (line 26) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/NicknameChangedEvent.java
  class NicknameChangedEvent (line 15) | public class NicknameChangedEvent implements NotificationEvent {
    method NicknameChangedEvent (line 21) | public NicknameChangedEvent(String userId, String nickname) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/NotificationEvent.java
  type NotificationEvent (line 9) | public interface NotificationEvent {
    method trigger (line 14) | void trigger();

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/OnlineStatusChangedEvent.java
  class OnlineStatusChangedEvent (line 15) | public class OnlineStatusChangedEvent implements NotificationEvent {
    method OnlineStatusChangedEvent (line 21) | public OnlineStatusChangedEvent(String userId, String onlineStatus) {
    method trigger (line 29) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/ReadMessageEvent.java
  class ReadMessageEvent (line 15) | public class ReadMessageEvent implements NotificationEvent {
    method ReadMessageEvent (line 25) | public ReadMessageEvent(String userId, String channelId, short total, ...
    method trigger (line 35) | @Override

FILE: leo-im-notification/src/main/java/org/leo/im/notification/event/RemoveFromChannelEvent.java
  class RemoveFromChannelEvent (line 16) | public class RemoveFromChannelEvent implements NotificationEvent {
    method RemoveFromChannelEvent (line 28) | public RemoveFromChannelEvent(String channelId, String[] userIds, Stri...
    method trigger (line 39) | @Override

FILE: leo-im-notification/src/test/java/org/leo/im/notification/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-service/src/main/java/org/leo/im/service/ChannelServiceImpl.java
  class ChannelServiceImpl (line 34) | public final class ChannelServiceImpl implements ChannelService {
    method listChannel (line 43) | @Override
    method listGroupChannel (line 62) | @Override
    method saveChannel (line 82) | @Override
    method getById (line 160) | @Override
    method isAdmin (line 179) | @Override
    method updateName (line 190) | @Override
    method updatePurpose (line 205) | @Override
    method addMember (line 218) | @Override
    method removeMember (line 267) | @Override
    method listMember (line 291) | @Override
    method changeAdmin (line 312) | @Override
    method leaveChannel (line 324) | @Override
    method removeChannel (line 341) | @Override
    method getDTOFromChannel (line 365) | private ChannelDTO getDTOFromChannel(Channel channel) {
    method getMembers (line 388) | private List<ChannelMember> getMembers(ChannelDTO dto) {
    method getUserChannels (line 409) | private List<UserChannel> getUserChannels(Channel channel, List<Channe...
    method publishChannelCreatedEvent (line 451) | private void publishChannelCreatedEvent(Channel channel, List<ChannelM...
    method publishJoinChannelEvent (line 475) | private void publishJoinChannelEvent(Channel channel, List<ChannelMemb...
    method publishNameChangedEvent (line 497) | private void publishNameChangedEvent(String channelId, String channelN...

FILE: leo-im-service/src/main/java/org/leo/im/service/MessageServiceImpl.java
  class MessageServiceImpl (line 31) | public final class MessageServiceImpl implements MessageService {
    method listMessage (line 42) | @Override
    method getById (line 77) | @Override
    method saveMessage (line 112) | @Override
    method saveMessage (line 166) | @Override
    method readMessage (line 203) | @Override
    method removeMessage (line 231) | @Override
    method saveFile (line 244) | @Override
    method publishNewMessageEvent (line 256) | private void publishNewMessageEvent(MessageDTO dto, Channel channel) {

FILE: leo-im-service/src/main/java/org/leo/im/service/UnreadMessageCountServiceImpl.java
  class UnreadMessageCountServiceImpl (line 12) | public class UnreadMessageCountServiceImpl implements UnreadMessageCount...
    method batchSaveUnreadMessageCount (line 21) | @Override
    method updateUnreadMessageCount (line 34) | @Override
    method batchUpdateUnreadMessageCount (line 47) | @Override
    method batchIncreaseUnreadMessageCount (line 60) | @Override
    method increaseUnreadMessageCount (line 73) | @Override

FILE: leo-im-service/src/main/java/org/leo/im/service/UserChannelServiceImpl.java
  class UserChannelServiceImpl (line 17) | public final class UserChannelServiceImpl implements UserChannelService {
    method listUserChannel (line 26) | @Override
    method get (line 53) | @Override
    method updateDisplayName (line 81) | @Override
    method hideChannel (line 92) | @Override
    method listByName (line 104) | @Override

FILE: leo-im-service/src/main/java/org/leo/im/service/UserServiceImpl.java
  class UserServiceImpl (line 29) | public final class UserServiceImpl implements UserService {
    method verifyLogin (line 37) | @Override
    method getById (line 62) | @Override
    method saveUser (line 77) | @Override
    method listByNameOrNickname (line 106) | @Override
    method updateUser (line 124) | @Override
    method listNonMembers (line 159) | public Page<UserDTO> listNonMembers(String channelId, String username,...
    method batchOffline (line 181) | @Override
    method updatePassword (line 194) | @Override
    method publishEvent (line 217) | private void publishEvent(UserDTO dto) {

FILE: leo-im-service/src/main/java/org/leo/im/service/support/CacheableHolder.java
  class CacheableHolder (line 9) | public class CacheableHolder {
    method setCacheable (line 17) | public static void setCacheable(boolean cacheable) {
    method getCacheable (line 25) | public static boolean getCacheable() {
    method remove (line 33) | public static void remove() {

FILE: leo-im-service/src/main/java/org/leo/im/service/support/ServiceProxy.java
  class ServiceProxy (line 17) | public final class ServiceProxy implements InvocationHandler {
    method ServiceProxy (line 24) | private ServiceProxy(Object target) {
    method newProxyInstance (line 36) | @SuppressWarnings("unchecked")
    method invoke (line 42) | @Override

FILE: leo-im-service/src/main/java/org/leo/im/service/util/PasswordUtils.java
  class PasswordUtils (line 15) | public final class PasswordUtils {
    method generateSalt (line 27) | public static String generateSalt() {
    method getMd5Password (line 43) | public static String getMd5Password(String password, String salt)
    method byteToHexString (line 55) | private static String byteToHexString(byte[] salt) {

FILE: leo-im-service/src/test/java/org/leo/im/service/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-socket/src/main/java/org/leo/im/socket/ChannelIdSet.java
  class ChannelIdSet (line 15) | public class ChannelIdSet {
    method size (line 26) | public int size() {
    method getSet (line 40) | public Set<String> getSet() {
    method add (line 55) | public boolean add(String channelId) {
    method remove (line 70) | public boolean remove(String channelId) {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/ChannelsHolder.java
  class ChannelsHolder (line 18) | public class ChannelsHolder {
    method getChannelGroups (line 43) | public static Map<String, ChannelGroup> getChannelGroups() {
    method addChannel (line 52) | public static void addChannel(String userId, Channel channel) {
    method removeChannel (line 72) | public static void removeChannel(String channelId) {
    method getUserIdByChannelId (line 93) | public static String getUserIdByChannelId(String channelId) {
    method getChannelsByUserId (line 102) | public static ChannelIdSet getChannelsByUserId(String userId) {
    method getChannelById (line 111) | public static Channel getChannelById(String channelId) {
    method addChannelToGroup (line 120) | public static void addChannelToGroup(String groupId, Channel channel) {
    method getUserIds (line 153) | public static Set<String> getUserIds() {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/SocketChannel.java
  class SocketChannel (line 11) | public class SocketChannel {
    method toString (line 17) | @Override
    method SocketChannel (line 22) | public SocketChannel(Channel channel) {
    method getUserId (line 26) | public String getUserId() {
    method setUserId (line 29) | public void setUserId(String userId) {
    method getChannel (line 33) | public Channel getChannel() {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/WebSocketChannelInitializer.java
  class WebSocketChannelInitializer (line 24) | public class WebSocketChannelInitializer extends ChannelInitializer<Sock...
    method newThread (line 54) | @Override
    method initChannel (line 60) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/WebSocketServer.java
  class WebSocketServer (line 28) | public class WebSocketServer {
    method WebSocketServer (line 47) | public WebSocketServer(int port) {
    method getBossThreads (line 51) | public int getBossThreads() {
    method setBossThreads (line 54) | public void setBossThreads(int bossThreads) {
    method getWorkerThreads (line 58) | public int getWorkerThreads() {
    method setWorkerThreads (line 61) | public void setWorkerThreads(int workerThreads) {
    method start (line 69) | public void start() throws InterruptedException {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/exception/MessageHandleException.java
  class MessageHandleException (line 9) | public final class MessageHandleException extends RuntimeException {
    method MessageHandleException (line 13) | public MessageHandleException() {
    method MessageHandleException (line 16) | public MessageHandleException(String message) {
    method MessageHandleException (line 20) | public MessageHandleException(String message, Throwable cause) {
    method MessageHandleException (line 24) | public MessageHandleException(Throwable cause) {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/handler/TextWebSocketFrameHandler.java
  class TextWebSocketFrameHandler (line 50) | public final class TextWebSocketFrameHandler extends SimpleChannelInboun...
    method channelRead0 (line 60) | @Override
    method channelReadComplete (line 76) | @Override
    method exceptionCaught (line 81) | @Override
    method handlerRemoved (line 87) | @Override
    method channelInactive (line 92) | @Override
    method handleHttpRequest (line 104) | private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequ...
    method handleWebSocketFrame (line 164) | private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocket...
    method getRequestParameter (line 197) | private static String getRequestParameter(FullHttpRequest req, String ...
    method handleMessage (line 214) | private void handleMessage(Channel channel, String message) {
    method bindChannelToGroupChannel (line 241) | private void bindChannelToGroupChannel(JSONObject message, Channel cha...
    method removeChannelFromGroupChannel (line 255) | private void removeChannelFromGroupChannel(JSONObject message, Channel...
    method clientOffline (line 267) | private void clientOffline(ChannelHandlerContext ctx) {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/QueueSubscriber.java
  class QueueSubscriber (line 16) | public class QueueSubscriber implements Subscriber {
    method onMessage (line 23) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/SubscriberFactory.java
  class SubscriberFactory (line 11) | public class SubscriberFactory {
    method createSubscriber (line 18) | public static Subscriber createSubscriber() {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/AbstractMessageHandler.java
  class AbstractMessageHandler (line 16) | public class AbstractMessageHandler {
    method setGroups (line 22) | protected void setGroups(String... groups) {
    method setUsers (line 26) | protected void setUsers(String... users) {
    method getUsers (line 29) | protected String[] getUsers() {
    method handleMessage (line 37) | public void handleMessage(String message) {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/AvatarChangedHandler.java
  class AvatarChangedHandler (line 8) | public class AvatarChangedHandler extends AbstractMessageHandler impleme...
    method doHandle (line 16) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/ChannelCreatedHandler.java
  class ChannelCreatedHandler (line 19) | public class ChannelCreatedHandler extends AbstractMessageHandler implem...
    method doHandle (line 24) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/ChannelNameChangedHandler.java
  class ChannelNameChangedHandler (line 12) | public class ChannelNameChangedHandler extends AbstractMessageHandler im...
    method doHandle (line 19) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/ChannelRemovedHandler.java
  class ChannelRemovedHandler (line 11) | public class ChannelRemovedHandler extends AbstractMessageHandler implem...
    method doHandle (line 19) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/JoinChannelHandler.java
  class JoinChannelHandler (line 21) | public class JoinChannelHandler extends AbstractMessageHandler implement...
    method doHandle (line 28) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/LeaveChannelHandler.java
  class LeaveChannelHandler (line 17) | public class LeaveChannelHandler extends AbstractMessageHandler implemen...
    method doHandle (line 25) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/MembersCountChangedHandler.java
  class MembersCountChangedHandler (line 11) | public class MembersCountChangedHandler extends AbstractMessageHandler i...
    method doHandle (line 18) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/MessageHandler.java
  type MessageHandler (line 9) | public interface MessageHandler {
    method doHandle (line 16) | void doHandle(String channel, String message);

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/MessageHandlerFactory.java
  class MessageHandlerFactory (line 11) | public class MessageHandlerFactory {
    method createMessageHandler (line 19) | public static MessageHandler createMessageHandler(String messageType) {

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/NewMessageHandler.java
  class NewMessageHandler (line 11) | public class NewMessageHandler extends AbstractMessageHandler implements...
    method doHandle (line 19) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/NicknameChangedHandler.java
  class NicknameChangedHandler (line 9) | public class NicknameChangedHandler extends AbstractMessageHandler imple...
    method doHandle (line 17) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/OnlineStatusChangedHandler.java
  class OnlineStatusChangedHandler (line 9) | public class OnlineStatusChangedHandler extends AbstractMessageHandler i...
    method doHandle (line 17) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/ReadMessageHandler.java
  class ReadMessageHandler (line 11) | public class ReadMessageHandler extends AbstractMessageHandler implement...
    method doHandle (line 19) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/RemoveFromChannelHandler.java
  class RemoveFromChannelHandler (line 21) | public class RemoveFromChannelHandler extends AbstractMessageHandler imp...
    method doHandle (line 28) | @Override

FILE: leo-im-socket/src/main/java/org/leo/im/socket/subscription/handler/RemoveMessageHandler.java
  class RemoveMessageHandler (line 13) | public class RemoveMessageHandler extends AbstractMessageHandler impleme...
    method doHandle (line 18) | @Override

FILE: leo-im-socket/src/test/java/org/leo/im/socket/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-starter/src/main/java/org/leo/im/starter/App.java
  class App (line 24) | public class App {
    method main (line 28) | public static void main(String[] args) {
    method loadConfigFile (line 96) | private static void loadConfigFile(String confHome) throws IOException {
    method canStartServer (line 107) | private static boolean canStartServer(String serverTypeConfig, String ...
    method cleanResources (line 120) | private static void cleanResources() {

FILE: leo-im-starter/src/test/java/org/leo/im/starter/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-store/src/main/java/org/leo/im/store/connection/ConnectionFactory.java
  type ConnectionFactory (line 11) | public interface ConnectionFactory {
    method getConnection (line 22) | Connection getConnection();
    method getConnection (line 29) | Connection getConnection(String connectionString);
    method closeConnection (line 34) | void closeConnection();

FILE: leo-im-store/src/main/java/org/leo/im/store/connection/ConnectionProvider.java
  class ConnectionProvider (line 11) | public final class ConnectionProvider {
    method getConnection (line 17) | public static Connection getConnection() {

FILE: leo-im-store/src/main/java/org/leo/im/store/connection/impl/PoolConnectionFactory.java
  class PoolConnectionFactory (line 18) | public final class PoolConnectionFactory implements ConnectionFactory {
    method PoolConnectionFactory (line 25) | private PoolConnectionFactory() {
    class InstanceHolder (line 29) | private static class InstanceHolder {
    method getInstance (line 37) | public static PoolConnectionFactory getInstance() {
    method getConnection (line 45) | @Override
    method getConnection (line 55) | @Override
    method closeConnection (line 68) | @Override
    method getConnectionPool (line 85) | private ConnectionPool getConnectionPool() {

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/BaseDAO.java
  type BaseDAO (line 20) | public interface BaseDAO {
    method createId (line 29) | default String createId() {
    method setPreparedStatmentParameters (line 41) | default void setPreparedStatmentParameters(PreparedStatement stmt, Lis...

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/ChannelDAO.java
  type ChannelDAO (line 14) | public interface ChannelDAO {
    method list (line 22) | List<Channel> list(Map<String, Object> parameters, int limit);
    method listGroupChannel (line 31) | List<Channel> listGroupChannel(Map<String, Object> parameters, String[...
    method save (line 38) | Channel save(Channel channel);
    method getByFromAndTo (line 46) | Channel getByFromAndTo(String fromUserId, String toUserId);
    method getById (line 53) | Channel getById(String id);
    method updateLastPostAt (line 61) | int updateLastPostAt(String id, long lastPostAt);
    method increaseMemberCount (line 69) | int increaseMemberCount(String id, int count);
    method updateStringField (line 78) | int updateStringField(String id, String field, String value);
    method updateIntegerField (line 87) | int updateIntegerField(String id, String field, int value);
    method remove (line 94) | int remove(String id);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/ChannelMemberDAO.java
  type ChannelMemberDAO (line 14) | public interface ChannelMemberDAO {
    method save (line 22) | int save(String channelId, List<ChannelMember> members);
    method listMember (line 32) | Page<ChannelMember> listMember(String channelId, String username, int ...
    method isAdmin (line 40) | boolean isAdmin(String userId, String channelId);
    method removeMember (line 48) | int removeMember(String channelId, String memberId);
    method changeAdmin (line 57) | int changeAdmin(String channelId, String memberId, boolean isAdmin);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/FileDAO.java
  type FileDAO (line 11) | public interface FileDAO {
    method save (line 18) | String save(File file);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/HideChannelDAO.java
  type HideChannelDAO (line 9) | public interface HideChannelDAO {
    method save (line 17) | int save(String userId, String channelId);
    method remove (line 25) | int remove(String userId, String channelId);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/MessageDAO.java
  type MessageDAO (line 13) | public interface MessageDAO {
    method listMessage (line 22) | List<Message> listMessage(String channelId, long maxCreateAt, int limit);
    method getById (line 29) | Message getById(long id);
    method save (line 36) | long save(Message message);
    method save (line 43) | int save(List<Message> messages);
    method remove (line 51) | int remove(long messageId, String userId);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/UnreadMessageCountDAO.java
  type UnreadMessageCountDAO (line 9) | public interface UnreadMessageCountDAO {
    method save (line 18) | int save(String userId, String channelId, short total);
    method batchSave (line 27) | int batchSave(String[] userIds, String channelId, short total);
    method update (line 36) | int update(String userId, String channelId, short total);
    method batchUpdate (line 45) | int batchUpdate(String[] userIds, String channelId, short total);
    method increase (line 54) | int increase(String userId, String channelId, short total);
    method batchIncrease (line 63) | int batchIncrease(String[] userIds, String channelId, short total);
    method increaseGroupChannel (line 72) | int increaseGroupChannel(String channelId, String[] exceptiveUserIds, ...
    method decrease (line 81) | int decrease(String userId, String channelId, short total);
    method remove (line 89) | int remove(String channelId, String userId);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/UserChannelDAO.java
  type UserChannelDAO (line 13) | public interface UserChannelDAO {
    method listByUserId (line 22) | List<UserChannel> listByUserId(String userId, String type, int limit);
    method save (line 29) | int save(UserChannel userChannel);
    method batchSave (line 36) | int batchSave(List<UserChannel> userChannels);
    method get (line 44) | UserChannel get(String userId, String channelId);
    method updateDisplayName (line 53) | int updateDisplayName(String channelId, String userId, String displayN...
    method remove (line 61) | int remove(String userId, String channelId);
    method listByName (line 70) | List<UserChannel> listByName(String userId, String name, String type);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/UserDAO.java
  type UserDAO (line 14) | public interface UserDAO {
    method save (line 21) | String save(User user);
    method getByName (line 28) | User getByName(String name);
    method getById (line 35) | User getById(String id);
    method listByNameOrNickname (line 44) | Page<User> listByNameOrNickname(String name, int limit, int offset);
    method update (line 51) | int update(User user);
    method update (line 59) | int update(User user, boolean updateNullValueField);
    method usernameExists (line 67) | boolean usernameExists(String userId, String username);
    method listNonMembers (line 77) | Page<User> listNonMembers(String channelId, String username, int limit...
    method offline (line 84) | int offline(Set<String> userIds);

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcChannelDAOImpl.java
  class JdbcChannelDAOImpl (line 30) | public final class JdbcChannelDAOImpl implements BaseDAO, ChannelDAO {
    method list (line 42) | @Override
    method listGroupChannel (line 54) | @Override
    method save (line 75) | @Override
    method getByFromAndTo (line 104) | @Override
    method getById (line 163) | @Override
    method updateLastPostAt (line 228) | public int updateLastPostAt(String id, long lastPostAt) {
    method increaseMemberCount (line 254) | public int increaseMemberCount(String id, int count) {
    method updateStringField (line 281) | @Override
    method updateIntegerField (line 310) | @Override
    method remove (line 337) | @Override
    method listChannel (line 366) | private List<Channel> listChannel(Map<String, Object> parameters, Stri...
    method buildQuerySql (line 413) | private SqlBuildResult buildQuerySql(Map<String, Object> parameters, S...
    method getParameter (line 449) | private Parameter getParameter(String name, Object value) {
    method buildInsertGroupChannelSql (line 467) | private SqlBuildResult buildInsertGroupChannelSql(Channel channel) {
    method buildInsertPrivateChannelSql (line 505) | private SqlBuildResult buildInsertPrivateChannelSql(Channel channel) {

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcChannelMemberDAOImpl.java
  class JdbcChannelMemberDAOImpl (line 25) | public class JdbcChannelMemberDAOImpl implements BaseDAO, ChannelMemberD...
    method save (line 38) | @Override
    method listMember (line 73) | @Override
    method isAdmin (line 149) | @Override
    method removeMember (line 184) | public int removeMember(String channelId, String memberId) {
    method changeAdmin (line 211) | @Override

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcFileDAOImpl.java
  class JdbcFileDAOImpl (line 20) | public class JdbcFileDAOImpl implements BaseDAO, FileDAO {
    method save (line 29) | @Override

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcHideChannelDAOImpl.java
  class JdbcHideChannelDAOImpl (line 13) | public class JdbcHideChannelDAOImpl implements BaseDAO, HideChannelDAO {
    method save (line 22) | @Override
    method remove (line 48) | @Override

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcMessageDAOImpl.java
  class JdbcMessageDAOImpl (line 30) | public final class JdbcMessageDAOImpl implements BaseDAO, MessageDAO {
    method listMessage (line 46) | @Override
    method getById (line 91) | @Override
    method save (line 126) | @Override
    method save (line 152) | @Override
    method remove (line 184) | @Override
    method buildInsertSql (line 213) | private SqlBuildResult buildInsertSql(Message message) {
    method buildBatchInsertSql (line 250) | private BatchSqlBuildResult buildBatchInsertSql(List<Message> messages) {
    method getMessageList (line 300) | private List<Message> getMessageList(ResultSet rs, int count) throws S...

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcUnreadMessageCountDAOImpl.java
  class JdbcUnreadMessageCountDAOImpl (line 23) | public final class JdbcUnreadMessageCountDAOImpl implements BaseDAO, Unr...
    method save (line 34) | @Override
    method batchSave (line 46) | @Override
    method update (line 77) | @Override
    method batchUpdate (line 89) | @Override
    method increase (line 120) | @Override
    method batchIncrease (line 132) | @Override
    method increaseGroupChannel (line 163) | @Override
    method decrease (line 203) | public int decrease(String userId, String channelId, short total) {
    method remove (line 232) | @Override

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcUserChannelDAOImpl.java
  class JdbcUserChannelDAOImpl (line 27) | public final class JdbcUserChannelDAOImpl implements BaseDAO, UserChanne...
    method listByUserId (line 46) | @Override
    method save (line 109) | @Override
    method batchSave (line 121) | @Override
    method get (line 153) | @Override
    method updateDisplayName (line 208) | @Override
    method remove (line 239) | @Override
    method listByName (line 267) | public List<UserChannel> listByName(String userId, String name, String...

FILE: leo-im-store/src/main/java/org/leo/im/store/dao/impl/JdbcUserDAOImpl.java
  class JdbcUserDAOImpl (line 30) | public class JdbcUserDAOImpl implements BaseDAO, UserDAO {
    method save (line 42) | @Override
    method getByName (line 71) | @Override
    method getById (line 111) | @Override
    method listByNameOrNickname (line 150) | @Override
    method update (line 200) | @Override
    method update (line 211) | @Override
    method usernameExists (line 236) | @Override
    method listNonMembers (line 279) | @Override
    method offline (line 361) | @Override
    method buildInsertSql (line 391) | private SqlBuildResult buildInsertSql(User user) {
    method buildPagingQueryResult (line 423) | private SqlBuildResult buildPagingQueryResult(String name, int limit, ...
    method buildUpdateSql (line 455) | private SqlBuildResult buildUpdateSql(User user, boolean updateNullVal...

FILE: leo-im-store/src/main/java/org/leo/im/store/datasource/ConnectionPool.java
  type ConnectionPool (line 11) | public interface ConnectionPool {
    method getConnection (line 17) | Connection getConnection();

FILE: leo-im-store/src/main/java/org/leo/im/store/datasource/impl/DruidConnectionPool.java
  class DruidConnectionPool (line 20) | public class DruidConnectionPool implements ConnectionPool {
    method DruidConnectionPool (line 30) | private DruidConnectionPool() {
    class InstanceHolder (line 34) | private static class InstanceHolder {
    method getInstance (line 57) | public static DruidConnectionPool getInstance() {
    method getConnection (line 66) | @Override

FILE: leo-im-store/src/main/java/org/leo/im/store/exception/DAOException.java
  class DAOException (line 9) | public final class DAOException extends RuntimeException {
    method DAOException (line 13) | public DAOException() {
    method DAOException (line 16) | public DAOException(String message) {
    method DAOException (line 20) | public DAOException(String message, Throwable cause) {
    method DAOException (line 24) | public DAOException(Throwable cause) {

FILE: leo-im-store/src/main/java/org/leo/im/store/factory/DAOFactory.java
  class DAOFactory (line 26) | public final class DAOFactory {
    method createUserDAO (line 32) | public static UserDAO createUserDAO() {
    method createChannelDAO (line 45) | public static ChannelDAO createChannelDAO() {
    method createChannelMemberDAO (line 58) | public static ChannelMemberDAO createChannelMemberDAO() {
    method createUserChannelDAO (line 71) | public static UserChannelDAO createUserChannelDAO() {
    method createUnreadMessageCountDAO (line 84) | public static UnreadMessageCountDAO createUnreadMessageCountDAO() {
    method createMessageDAO (line 97) | public static MessageDAO createMessageDAO() {
    method createHideChannelDAO (line 110) | public static HideChannelDAO createHideChannelDAO() {
    method createFileDAO (line 123) | public static FileDAO createFileDAO() {

FILE: leo-im-store/src/main/java/org/leo/im/store/support/BatchSqlBuildResult.java
  class BatchSqlBuildResult (line 11) | public final class BatchSqlBuildResult {
    method BatchSqlBuildResult (line 17) | public BatchSqlBuildResult(String sql, List<List<Parameter>> parameter...
    method getSql (line 22) | public String getSql() {
    method getParameters (line 26) | public List<List<Parameter>> getParameters() {

FILE: leo-im-store/src/main/java/org/leo/im/store/support/Parameter.java
  class Parameter (line 9) | public final class Parameter {
    method Parameter (line 17) | public Parameter(String name, ParameterDataTypeEnum dataType, Object v...
    method getName (line 23) | public String getName() {
    method setName (line 26) | public void setName(String name) {
    method getDataType (line 30) | public ParameterDataTypeEnum getDataType() {
    method setDataType (line 33) | public void setDataType(ParameterDataTypeEnum dataType) {
    method getValue (line 37) | public Object getValue() {
    method setValue (line 40) | public void setValue(Object value) {

FILE: leo-im-store/src/main/java/org/leo/im/store/support/ParameterDataTypeEnum.java
  type ParameterDataTypeEnum (line 9) | public enum ParameterDataTypeEnum {

FILE: leo-im-store/src/main/java/org/leo/im/store/support/SqlBuildResult.java
  class SqlBuildResult (line 11) | public final class SqlBuildResult {
    method SqlBuildResult (line 19) | public SqlBuildResult(String sql, List<Parameter> parameters) {
    method SqlBuildResult (line 24) | public SqlBuildResult(String countSql, String sql, List<Parameter> par...
    method getCountSql (line 30) | public String getCountSql() {
    method getSql (line 34) | public String getSql() {
    method getParameters (line 38) | public List<Parameter> getParameters() {

FILE: leo-im-store/src/main/java/org/leo/im/store/util/DbUtils.java
  class DbUtils (line 16) | public class DbUtils {
    method closeResultSet (line 25) | public static void closeResultSet(ResultSet rs) {
    method closeStatement (line 40) | public static void closeStatement(Statement stmt) {

FILE: leo-im-store/src/main/java/org/leo/im/store/util/FirstLetterUtil.java
  class FirstLetterUtil (line 9) | public class FirstLetterUtil {
    method getFirstLetter (line 59) | public static String getFirstLetter(String source) {
    method char2Initial (line 73) | private static char char2Initial(char ch) {
    method gbValue (line 107) | private static int gbValue(char ch) {

FILE: leo-im-store/src/test/java/org/leo/im/store/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()

FILE: leo-im-util/src/main/java/org/leo/im/util/BeanUtils.java
  class BeanUtils (line 11) | public final class BeanUtils {
    method copyProperties (line 18) | public static void copyProperties(Object source, Object target) {

FILE: leo-im-util/src/main/java/org/leo/im/util/JwtUtils.java
  class JwtUtils (line 20) | public class JwtUtils {
    method generalKey (line 28) | private static SecretKey generalKey(String secret) {
    method createJWT (line 42) | public static String createJWT(String subject, String secret, long ttl...
    method parseJWT (line 65) | public static Claims parseJWT(String jwt, String secret) {

FILE: leo-im-util/src/test/java/org/leo/im/util/AppTest.java
  class AppTest (line 10) | public class AppTest
    method AppTest (line 18) | public AppTest( String testName )
    method suite (line 26) | public static Test suite()
    method testApp (line 34) | public void testApp()
Condensed preview — 357 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (605K chars).
[
  {
    "path": ".classpath",
    "chars": 549,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTA"
  },
  {
    "path": ".gitignore",
    "chars": 278,
    "preview": "# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Packa"
  },
  {
    "path": ".project",
    "chars": 535,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im</name>\n\t<comment></comment>\n\t<projects>\n\t</pro"
  },
  {
    "path": ".settings/org.eclipse.core.resources.prefs",
    "chars": 55,
    "preview": "eclipse.preferences.version=1\nencoding/<project>=UTF-8\n"
  },
  {
    "path": ".settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": ".settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 1326,
    "preview": "# ![Leo-IM](https://raw.githubusercontent.com/wiki/lining90567/leo-im-server/leo-im.png)\n\nLeo-IM,开源好用的IM。\n\nLeo-IM是基于Java"
  },
  {
    "path": "assemble/bin/run.bat",
    "chars": 373,
    "preview": "@REM app launcher script\n@REM\n@REM Environment:\n@REM JAVA_HOME - location of a JDK home dir (optional if java on path)\n@"
  },
  {
    "path": "assemble/bin/run.sh",
    "chars": 355,
    "preview": "#!/bin/sh\n\n###  ------------------------------- ###\n###  leo-im-server launcher script   ###\n###  ----------------------"
  },
  {
    "path": "assemble/package.xml",
    "chars": 869,
    "preview": "<assembly xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schema"
  },
  {
    "path": "leo-im-api/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-api/.project",
    "chars": 539,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-api</name>\n\t<comment></comment>\n\t<projects>\n\t<"
  },
  {
    "path": "leo-im-api/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-api/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-api/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-api/pom.xml",
    "chars": 715,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/annotation/Cacheable.java",
    "chars": 421,
    "preview": "package org.leo.im.api.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Inherited;\nimpo"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/annotation/Transactional.java",
    "chars": 450,
    "preview": "package org.leo.im.api.annotation;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/ChannelDTO.java",
    "chars": 3663,
    "preview": "package org.leo.im.api.dto;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * 频道dto类\n * \n * @author Leo\n * @da"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/ChannelListDTO.java",
    "chars": 1307,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * Channel列表DTO\n * \n * @author Leo\n * @date 2018/3/30\n */\npublic class ChannelListDTO {"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/ChannelMemberDTO.java",
    "chars": 777,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * 频道成员dto类\n * \n * @author Leo\n * @date 2018/4/11\n */\npublic class ChannelMemberDTO {\n "
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/FileDTO.java",
    "chars": 2186,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * 文件dto类\n * \n * @author Leo\n * @date 2018/6/13\n */\npublic class FileDTO {\n    \n    pri"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/MessageDTO.java",
    "chars": 5889,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * 消息dto类\n * \n * @author Leo\n * @date 2018/5/15\n */\npublic class MessageDTO {\n\n    priv"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/UserChannelDTO.java",
    "chars": 2867,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * 用户频道dto类\n * \n * @author Leo\n * @date 2018/4/20\n */\npublic class UserChannelDTO {\n\n  "
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/dto/UserDTO.java",
    "chars": 2174,
    "preview": "package org.leo.im.api.dto;\n\n/**\n * 用户dto类\n * \n * @author Leo\n * @date 2018/3/30\n */\npublic class UserDTO {\n\n    private"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/exception/ServiceException.java",
    "chars": 521,
    "preview": "package org.leo.im.api.exception;\n\n/**\n * 服务异常类\n * \n * @author Leo\n * @date 2018/3/20\n */\npublic final class ServiceExce"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/service/ChannelService.java",
    "chars": 2876,
    "preview": "package org.leo.im.api.service;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport org.leo.im.api.annotation.Transact"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/service/MessageService.java",
    "chars": 1406,
    "preview": "package org.leo.im.api.service;\n\nimport java.util.List;\n\nimport org.leo.im.api.annotation.Transactional;\nimport org.leo."
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/service/UnreadMessageCountService.java",
    "chars": 1288,
    "preview": "package org.leo.im.api.service;\n\nimport org.leo.im.api.annotation.Transactional;\n\n/**\n * 未读消息数量服务接口\n * @author Administr"
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/service/UserChannelService.java",
    "chars": 1171,
    "preview": "package org.leo.im.api.service;\n\nimport java.util.List;\n\nimport org.leo.im.api.annotation.Transactional;\nimport org.leo."
  },
  {
    "path": "leo-im-api/src/main/java/org/leo/im/api/service/UserService.java",
    "chars": 1657,
    "preview": "package org.leo.im.api.service;\n\nimport java.util.Set;\n\nimport org.leo.im.api.annotation.Transactional;\nimport org.leo.i"
  },
  {
    "path": "leo-im-api/src/test/java/org/leo/im/api/AppTest.java",
    "chars": 642,
    "preview": "package org.leo.im.api;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.TestSuite;"
  },
  {
    "path": "leo-im-api/target/classes/META-INF/MANIFEST.MF",
    "chars": 251,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: leo-im-common-1.0.jar slf4j-api-1.7.25.jar logback-classic\n -1"
  },
  {
    "path": "leo-im-api/target/classes/META-INF/maven/org.leo.im/leo-im-api/pom.properties",
    "chars": 227,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:09 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-api/target/classes/META-INF/maven/org.leo.im/leo-im-api/pom.xml",
    "chars": 715,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-api/target/maven-archiver/pom.properties",
    "chars": 103,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:09 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-api\n"
  },
  {
    "path": "leo-im-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 1543,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-api\\src\\main\\java\\org\\leo\\im\\api\\service\\UserChannelService.java\nF:\\Develop\\"
  },
  {
    "path": "leo-im-api/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-api/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 90,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-api\\src\\test\\java\\org\\leo\\im\\api\\AppTest.java\n"
  },
  {
    "path": "leo-im-api/target/surefire-reports/TEST-org.leo.im.api.AppTest.xml",
    "chars": 5585,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.api.AppTest\" time=\"0.002\" err"
  },
  {
    "path": "leo-im-api/target/surefire-reports/org.leo.im.api.AppTest.txt",
    "chars": 267,
    "preview": "-------------------------------------------------------------------------------\nTest set: org.leo.im.api.AppTest\n-------"
  },
  {
    "path": "leo-im-api-provider/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-api-provider/.project",
    "chars": 548,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-api-provider</name>\n\t<comment></comment>\n\t<pro"
  },
  {
    "path": "leo-im-api-provider/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-api-provider/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-api-provider/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-api-provider/pom.xml",
    "chars": 927,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-api-provider/src/main/java/org/leo/im/api/provider/ServiceFactory.java",
    "chars": 1141,
    "preview": "package org.leo.im.api.provider;\n\nimport org.leo.im.api.service.ChannelService;\nimport org.leo.im.api.service.MessageSer"
  },
  {
    "path": "leo-im-api-provider/src/test/java/org/leo/im/api/provider/AppTest.java",
    "chars": 651,
    "preview": "package org.leo.im.api.provider;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.T"
  },
  {
    "path": "leo-im-api-provider/target/classes/META-INF/MANIFEST.MF",
    "chars": 687,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: leo-im-api-1.0.jar leo-im-common-1.0.jar leo-im-service-1.\n 0."
  },
  {
    "path": "leo-im-api-provider/target/classes/META-INF/maven/org.leo.im/leo-im-api-provider/pom.properties",
    "chars": 254,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:17 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-api-provider/target/classes/META-INF/maven/org.leo.im/leo-im-api-provider/pom.xml",
    "chars": 927,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-api-provider/target/maven-archiver/pom.properties",
    "chars": 112,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:18 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-api-provider\n"
  },
  {
    "path": "leo-im-api-provider/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-api-provider/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 115,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-api-provider\\src\\main\\java\\org\\leo\\im\\api\\provider\\ServiceFactory.java\n"
  },
  {
    "path": "leo-im-api-provider/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-api-provider/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 108,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-api-provider\\src\\test\\java\\org\\leo\\im\\api\\provider\\AppTest.java\n"
  },
  {
    "path": "leo-im-api-provider/target/surefire-reports/TEST-org.leo.im.api.provider.AppTest.xml",
    "chars": 5603,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.api.provider.AppTest\" time=\"0"
  },
  {
    "path": "leo-im-api-provider/target/surefire-reports/org.leo.im.api.provider.AppTest.txt",
    "chars": 276,
    "preview": "-------------------------------------------------------------------------------\nTest set: org.leo.im.api.provider.AppTes"
  },
  {
    "path": "leo-im-common/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-common/.project",
    "chars": 542,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-common</name>\n\t<comment></comment>\n\t<projects>"
  },
  {
    "path": "leo-im-common/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-common/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-common/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-common/pom.xml",
    "chars": 590,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-common/src/main/java/org/leo/im/common/data/Page.java",
    "chars": 529,
    "preview": "package org.leo.im.common.data;\n\nimport java.util.List;\n\n/**\n * 分页查询结果类\n * \n * @author Leo\n * @date 2018/4/8\n * @param <"
  },
  {
    "path": "leo-im-common/src/test/java/org/leo/im/common/AppTest.java",
    "chars": 645,
    "preview": "package org.leo.im.common;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.TestSui"
  },
  {
    "path": "leo-im-common/target/classes/META-INF/MANIFEST.MF",
    "chars": 229,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: slf4j-api-1.7.25.jar logback-classic-1.2.3.jar logback-cor\n e-"
  },
  {
    "path": "leo-im-common/target/classes/META-INF/maven/org.leo.im/leo-im-common/pom.properties",
    "chars": 236,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:08 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-common/target/classes/META-INF/maven/org.leo.im/leo-im-common/pom.xml",
    "chars": 590,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-common/target/maven-archiver/pom.properties",
    "chars": 106,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:08 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-common\n"
  },
  {
    "path": "leo-im-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 98,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-common\\src\\main\\java\\org\\leo\\im\\common\\data\\Page.java\n"
  },
  {
    "path": "leo-im-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 96,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-common\\src\\test\\java\\org\\leo\\im\\common\\AppTest.java\n"
  },
  {
    "path": "leo-im-common/target/surefire-reports/TEST-org.leo.im.common.AppTest.xml",
    "chars": 5591,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.common.AppTest\" time=\"0.007\" "
  },
  {
    "path": "leo-im-common/target/surefire-reports/org.leo.im.common.AppTest.txt",
    "chars": 270,
    "preview": "-------------------------------------------------------------------------------\nTest set: org.leo.im.common.AppTest\n----"
  },
  {
    "path": "leo-im-http/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-http/.project",
    "chars": 540,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-http</name>\n\t<comment></comment>\n\t<projects>\n\t"
  },
  {
    "path": "leo-im-http/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-http/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-http/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-http/pom.xml",
    "chars": 2153,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/HttpServer.java",
    "chars": 1495,
    "preview": "package org.leo.im.http;\n\nimport org.leo.im.http.controller.ExceptionController;\nimport org.leo.im.http.interceptor.Auth"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/cache/Cache.java",
    "chars": 943,
    "preview": "package org.leo.im.http.cache;\n\n/**\n * 缓存\n * \n * @author Leo\n * @date 2018/4/1\n */\nfinal class Cache {\n    \n    private "
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/cache/CacheManager.java",
    "chars": 676,
    "preview": "package org.leo.im.http.cache;\n\n/**\n * 缓存管理接口\n * \n * @author Leo\n * @date 2018/3/27\n */\npublic interface CacheManager {\n"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/cache/CacheManagerFactory.java",
    "chars": 567,
    "preview": "package org.leo.im.http.cache;\n\n/**\n * 缓存管理器工厂类\n * \n * @author Leo\n * @date 2018/3/27\n */\npublic final class CacheManage"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/cache/MapCacheManager.java",
    "chars": 2425,
    "preview": "package org.leo.im.http.cache;\n\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Set;\nimport java.util"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/constant/CacheKeys.java",
    "chars": 452,
    "preview": "package org.leo.im.http.constant;\n\n/**\n * 缓存key常量类\n * \n * @author Leo\n * @date 2018/4/1\n */\npublic final class CacheKeys"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/AuthController.java",
    "chars": 6473,
    "preview": "package org.leo.im.http.controller;\n\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.Map;\nimport j"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/BaseController.java",
    "chars": 1060,
    "preview": "package org.leo.im.http.controller;\n\nimport org.leo.im.http.util.JwtUtils;\n\nimport com.alibaba.fastjson.JSONObject;\n\nimp"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/ChannelController.java",
    "chars": 9809,
    "preview": "package org.leo.im.http.controller;\n\nimport org.leo.im.api.dto.ChannelDTO;\nimport org.leo.im.api.dto.ChannelMemberDTO;\ni"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/ExceptionController.java",
    "chars": 985,
    "preview": "package org.leo.im.http.controller;\n\nimport org.leo.web.exception.ResourceNotFoundException;\nimport org.leo.web.rest.Htt"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/MessageController.java",
    "chars": 8031,
    "preview": "package org.leo.im.http.controller;\n\nimport java.io.RandomAccessFile;\nimport java.text.SimpleDateFormat;\nimport java.uti"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/UserChannelController.java",
    "chars": 4367,
    "preview": "package org.leo.im.http.controller;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.leo.im.api.dto.UserC"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/controller/UserController.java",
    "chars": 9198,
    "preview": "package org.leo.im.http.controller;\n\nimport org.leo.im.api.service.UserService;\nimport org.leo.im.common.data.Page;\nimpo"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/exception/NoSuchSettingException.java",
    "chars": 558,
    "preview": "package org.leo.im.http.exception;\n\n/**\n * 无此配置异常类\n * \n * @author Leo\n * @date 2018/5/11\n */\npublic final class NoSuchSe"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/AbstractLocalFileStorage.java",
    "chars": 496,
    "preview": "package org.leo.im.http.file;\n\nimport java.io.FileNotFoundException;\nimport java.io.RandomAccessFile;\n\n/**\n * 本地文件存储抽象类\n"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorage.java",
    "chars": 612,
    "preview": "package org.leo.im.http.file;\n\nimport java.io.RandomAccessFile;\n\n/**\n * 头像存储接口\n * \n * @author Leo\n * @date 2018/5/11\n */"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/AvatarStorageFactory.java",
    "chars": 420,
    "preview": "package org.leo.im.http.file;\n\n/**\n * 头像存储工厂类\n * \n * @author Leo\n * @date 2018/5/11\n */\npublic final class AvatarStorage"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/FileStorage.java",
    "chars": 674,
    "preview": "package org.leo.im.http.file;\n\nimport java.io.RandomAccessFile;\n\n/**\n * 文件存储接口\n * \n * @author Leo\n * @date 2018/5/11\n */"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/FileStorageFactory.java",
    "chars": 402,
    "preview": "package org.leo.im.http.file;\n\n/**\n * 文件存储工厂类\n * @author Administrator\n *\n */\npublic final class FileStorageFactory {\n\n "
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/LocalAvatarStorage.java",
    "chars": 2758,
    "preview": "package org.leo.im.http.file;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.File;\nimport java.io.FileNotFoundExce"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/file/LocalFileStorage.java",
    "chars": 3886,
    "preview": "package org.leo.im.http.file;\n\nimport java.awt.image.BufferedImage;\nimport java.io.ByteArrayInputStream;\nimport java.io."
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/interceptor/AuthenticationInterceptor.java",
    "chars": 1088,
    "preview": "package org.leo.im.http.interceptor;\n\nimport org.leo.im.http.util.JwtUtils;\nimport org.leo.web.rest.HttpResponse;\nimport"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/interceptor/CorsInterceptor.java",
    "chars": 1245,
    "preview": "package org.leo.im.http.interceptor;\n\nimport org.leo.web.rest.HttpResponse;\nimport org.leo.web.rest.interceptor.Intercep"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/util/JwtUtils.java",
    "chars": 1799,
    "preview": "package org.leo.im.http.util;\n\nimport java.util.Base64;\nimport java.util.Date;\n\nimport javax.crypto.SecretKey;\nimport ja"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/vo/ChannelListVO.java",
    "chars": 1305,
    "preview": "package org.leo.im.http.vo;\n\n/**\n * 频道列表vo类\n * \n * @author Leo\n * @date 2018/4/3\n */\npublic final class ChannelListVO {\n"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/vo/ChannelVO.java",
    "chars": 2285,
    "preview": "package org.leo.im.http.vo;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.leo.im.api.dto.ChannelMember"
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/vo/MessageVO.java",
    "chars": 5708,
    "preview": "package org.leo.im.http.vo;\n\n/**\n * 消息vo类\n * \n * @author Leo\n * @date 2018/5/16\n */\npublic final class MessageVO {\n\n    "
  },
  {
    "path": "leo-im-http/src/main/java/org/leo/im/http/vo/UserChannelVO.java",
    "chars": 2858,
    "preview": "package org.leo.im.http.vo;\n\n/**\n * 用户频道vo类\n * \n * @author Leo\n * @date 2018/4/20\n */\npublic final class UserChannelVO {"
  },
  {
    "path": "leo-im-http/src/test/java/org/leo/im/http/AppTest.java",
    "chars": 643,
    "preview": "package org.leo.im.http;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.TestSuite"
  },
  {
    "path": "leo-im-http/target/classes/META-INF/MANIFEST.MF",
    "chars": 796,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: asm-6.1.jar thumbnailator-0.4.8.jar netty-all-4.1.24.Final\n .j"
  },
  {
    "path": "leo-im-http/target/classes/META-INF/maven/org.leo.im/leo-im-http/pom.properties",
    "chars": 230,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:34 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-http/target/classes/META-INF/maven/org.leo.im/leo-im-http/pom.xml",
    "chars": 2153,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-http/target/maven-archiver/pom.properties",
    "chars": 104,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:21 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-http\n"
  },
  {
    "path": "leo-im-http/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-http/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 2996,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-http\\src\\main\\java\\org\\leo\\im\\http\\controller\\BaseController.java\nF:\\Develop"
  },
  {
    "path": "leo-im-http/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-http/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 92,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-http\\src\\test\\java\\org\\leo\\im\\http\\AppTest.java\n"
  },
  {
    "path": "leo-im-http/target/surefire-reports/TEST-org.leo.im.http.AppTest.xml",
    "chars": 5587,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.http.AppTest\" time=\"0.002\" er"
  },
  {
    "path": "leo-im-http/target/surefire-reports/org.leo.im.http.AppTest.txt",
    "chars": 268,
    "preview": "-------------------------------------------------------------------------------\nTest set: org.leo.im.http.AppTest\n------"
  },
  {
    "path": "leo-im-migration/.classpath",
    "chars": 1195,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-migration/.project",
    "chars": 545,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-migration</name>\n\t<comment></comment>\n\t<projec"
  },
  {
    "path": "leo-im-migration/.settings/org.eclipse.core.resources.prefs",
    "chars": 150,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/main/resources=UTF-8\nencoding//src/test/java=U"
  },
  {
    "path": "leo-im-migration/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-migration/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-migration/pom.xml",
    "chars": 780,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-migration/src/main/java/org/leo/im/migration/FlywayMigration.java",
    "chars": 358,
    "preview": "package org.leo.im.migration;\n\nimport org.flywaydb.core.Flyway;\n\npublic class FlywayMigration {\n\t\n\t/**\n\t * 数据库迁移\n\t * @pa"
  },
  {
    "path": "leo-im-migration/src/main/resources/db/migration/V20180615___Init.sql",
    "chars": 3306,
    "preview": "CREATE TABLE IF NOT EXISTS `im_channel` (\n  `id` char(32) NOT NULL,\n  `name` varchar(64) NOT NULL,\n  `type` char(1) NOT "
  },
  {
    "path": "leo-im-migration/src/test/java/org/leo/im/migration/AppTest.java",
    "chars": 648,
    "preview": "package org.leo.im.migration;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.Test"
  },
  {
    "path": "leo-im-migration/target/classes/META-INF/MANIFEST.MF",
    "chars": 251,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: flyway-core-5.1.1.jar slf4j-api-1.7.25.jar logback-classic\n -1"
  },
  {
    "path": "leo-im-migration/target/classes/META-INF/maven/org.leo.im/leo-im-migration/pom.properties",
    "chars": 245,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:09 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-migration/target/classes/META-INF/maven/org.leo.im/leo-im-migration/pom.xml",
    "chars": 780,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-migration/target/classes/db/migration/V20180615___Init.sql",
    "chars": 3306,
    "preview": "CREATE TABLE IF NOT EXISTS `im_channel` (\n  `id` char(32) NOT NULL,\n  `name` varchar(64) NOT NULL,\n  `type` char(1) NOT "
  },
  {
    "path": "leo-im-migration/target/maven-archiver/pom.properties",
    "chars": 90,
    "preview": "#Created by Apache Maven 3.3.9\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-migration\n"
  },
  {
    "path": "leo-im-migration/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-migration/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 110,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-migration\\src\\main\\java\\org\\leo\\im\\migration\\FlywayMigration.java\n"
  },
  {
    "path": "leo-im-model/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-model/.project",
    "chars": 541,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-model</name>\n\t<comment></comment>\n\t<projects>\n"
  },
  {
    "path": "leo-im-model/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-model/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-model/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-model/pom.xml",
    "chars": 523,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/Channel.java",
    "chars": 2619,
    "preview": "package org.leo.im.model;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * 频道模型类\n * \n * @author Leo\n * @date "
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/ChannelMember.java",
    "chars": 592,
    "preview": "package org.leo.im.model;\n\n/**\n * 频道成员实体类\n * \n * @author Leo\n * @date 2018/4/11\n */\npublic final class ChannelMember {\n "
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/File.java",
    "chars": 2179,
    "preview": "package org.leo.im.model;\n\n/**\n * 文件类\n * \n * @author Leo\n * @date 2018/6/13\n */\npublic class File {\n    \n    private Str"
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/Message.java",
    "chars": 1575,
    "preview": "package org.leo.im.model;\n\n/**\n * 消息类\n * \n * @author Leo\n * @date 2018/4/21\n */\npublic final class Message {\n    \n    pr"
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/User.java",
    "chars": 2650,
    "preview": "package org.leo.im.model;\n\nimport java.util.Date;\n\n/**\n * 用户模型类\n * \n * @author Leo\n * @date 2018/3/30\n */\npublic final c"
  },
  {
    "path": "leo-im-model/src/main/java/org/leo/im/model/UserChannel.java",
    "chars": 1334,
    "preview": "package org.leo.im.model;\n\n/**\n * 用户频道类\n * \n * @author Leo\n * @date 2018/4/20\n */\npublic final class UserChannel {\n    \n"
  },
  {
    "path": "leo-im-model/src/test/java/org/leo/im/model/AppTest.java",
    "chars": 644,
    "preview": "package org.leo.im.model;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.TestSuit"
  },
  {
    "path": "leo-im-model/target/classes/META-INF/MANIFEST.MF",
    "chars": 229,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: slf4j-api-1.7.25.jar logback-classic-1.2.3.jar logback-cor\n e-"
  },
  {
    "path": "leo-im-model/target/classes/META-INF/maven/org.leo.im/leo-im-model/pom.properties",
    "chars": 233,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:10 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-model/target/classes/META-INF/maven/org.leo.im/leo-im-model/pom.xml",
    "chars": 523,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-model/target/maven-archiver/pom.properties",
    "chars": 105,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:10 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-model\n"
  },
  {
    "path": "leo-im-model/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-model/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 568,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-model\\src\\main\\java\\org\\leo\\im\\model\\ChannelMember.java\nF:\\Develop\\open-sour"
  },
  {
    "path": "leo-im-model/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-model/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 94,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-model\\src\\test\\java\\org\\leo\\im\\model\\AppTest.java\n"
  },
  {
    "path": "leo-im-model/target/surefire-reports/TEST-org.leo.im.model.AppTest.xml",
    "chars": 5589,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.model.AppTest\" time=\"0.001\" e"
  },
  {
    "path": "leo-im-model/target/surefire-reports/org.leo.im.model.AppTest.txt",
    "chars": 269,
    "preview": "-------------------------------------------------------------------------------\nTest set: org.leo.im.model.AppTest\n-----"
  },
  {
    "path": "leo-im-notification/.classpath",
    "chars": 998,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classpath>\n\t<classpathentry kind=\"src\" output=\"target/classes\" path=\"src/main/ja"
  },
  {
    "path": "leo-im-notification/.project",
    "chars": 548,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>leo-im-notification</name>\n\t<comment></comment>\n\t<pro"
  },
  {
    "path": "leo-im-notification/.settings/org.eclipse.core.resources.prefs",
    "chars": 115,
    "preview": "eclipse.preferences.version=1\nencoding//src/main/java=UTF-8\nencoding//src/test/java=UTF-8\nencoding/<project>=UTF-8\n"
  },
  {
    "path": "leo-im-notification/.settings/org.eclipse.jdt.core.prefs",
    "chars": 238,
    "preview": "eclipse.preferences.version=1\norg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\norg.eclipse.jdt.core.compiler.com"
  },
  {
    "path": "leo-im-notification/.settings/org.eclipse.m2e.core.prefs",
    "chars": 86,
    "preview": "activeProfiles=\neclipse.preferences.version=1\nresolveWorkspaceProjects=true\nversion=1\n"
  },
  {
    "path": "leo-im-notification/pom.xml",
    "chars": 963,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/ActionNames.java",
    "chars": 1468,
    "preview": "package org.leo.im.notification;\n\n/**\n * 动作名称常量类\n * \n * @author Leo\n * @date 2018/3/29\n */\npublic class ActionNames {\n  "
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/PublishKeys.java",
    "chars": 920,
    "preview": "package org.leo.im.notification;\n\n/**\n * 发布key常量类\n * \n * @author Leo\n * @date 2018/3/29\n */\npublic class PublishKeys {\n\n"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/Publisher.java",
    "chars": 397,
    "preview": "package org.leo.im.notification;\n\n/**\n * 发布者接口\n * \n * @author Leo\n * @date 2018/3/28\n */\npublic interface Publisher {\n  "
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/PublisherFactory.java",
    "chars": 531,
    "preview": "package org.leo.im.notification;\n\nimport org.leo.im.notification.Publisher;\nimport org.leo.im.notification.QueuePublishe"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/QueuePublisher.java",
    "chars": 3070,
    "preview": "package org.leo.im.notification;\n\nimport java.util.Map;\nimport java.util.concurrent.BlockingQueue;\nimport java.util.conc"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/Subscriber.java",
    "chars": 251,
    "preview": "package org.leo.im.notification;\n\n/**\n * 订阅者接口\n * \n * @author Leo\n * @date 2018/3/28\n */\npublic interface Subscriber {\n "
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/ThreadPoolHolder.java",
    "chars": 1537,
    "preview": "package org.leo.im.notification;\n\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.LinkedBlockin"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/AvatarChangedEvent.java",
    "chars": 903,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelCreatedEvent.java",
    "chars": 946,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelNameChangedEvent.java",
    "chars": 986,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/ChannelRemovedEvent.java",
    "chars": 794,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/JoinChannelEvent.java",
    "chars": 2104,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/LeaveChannelEvent.java",
    "chars": 1307,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/MembersCountChangedEvent.java",
    "chars": 948,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/MessageRemovedEvent.java",
    "chars": 1217,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/NewMessageEvent.java",
    "chars": 1110,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/NicknameChangedEvent.java",
    "chars": 921,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/NotificationEvent.java",
    "chars": 189,
    "preview": "package org.leo.im.notification.event;\n\n/**\n * 通知事件接口\n * \n * @author Leo\n * @date 2018/5/10\n */\npublic interface Notific"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/OnlineStatusChangedEvent.java",
    "chars": 955,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/ReadMessageEvent.java",
    "chars": 1160,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/main/java/org/leo/im/notification/event/RemoveFromChannelEvent.java",
    "chars": 2157,
    "preview": "package org.leo.im.notification.event;\n\nimport org.leo.im.notification.ActionNames;\nimport org.leo.im.notification.Publi"
  },
  {
    "path": "leo-im-notification/src/test/java/org/leo/im/notification/AppTest.java",
    "chars": 651,
    "preview": "package org.leo.im.notification;\n\nimport junit.framework.Test;\nimport junit.framework.TestCase;\nimport junit.framework.T"
  },
  {
    "path": "leo-im-notification/target/classes/META-INF/MANIFEST.MF",
    "chars": 291,
    "preview": "Manifest-Version: 1.0\nBuilt-By: Administrator\nClass-Path: jedis-2.9.0.jar commons-pool2-2.4.2.jar fastjson-1.2.47.ja\n r "
  },
  {
    "path": "leo-im-notification/target/classes/META-INF/maven/org.leo.im/leo-im-notification/pom.properties",
    "chars": 254,
    "preview": "#Generated by Maven Integration for Eclipse\n#Tue Jun 19 09:17:11 CST 2018\nversion=1.0\ngroupId=org.leo.im\nm2e.projectName"
  },
  {
    "path": "leo-im-notification/target/classes/META-INF/maven/org.leo.im/leo-im-notification/pom.xml",
    "chars": 963,
    "preview": "<?xml version=\"1.0\"?>\n<project\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-"
  },
  {
    "path": "leo-im-notification/target/maven-archiver/pom.properties",
    "chars": 112,
    "preview": "#Generated by Maven\n#Tue Jun 12 16:14:16 CST 2018\nversion=1.0\ngroupId=org.leo.im\nartifactId=leo-im-notification\n"
  },
  {
    "path": "leo-im-notification/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst",
    "chars": 47,
    "preview": "org\\leo\\im\\notification\\QueuePublisher$1.class\n"
  },
  {
    "path": "leo-im-notification/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst",
    "chars": 2561,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-notification\\src\\main\\java\\org\\leo\\im\\notification\\event\\ReadMessageEvent.ja"
  },
  {
    "path": "leo-im-notification/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "leo-im-notification/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst",
    "chars": 108,
    "preview": "F:\\Develop\\open-source\\leo-im-server\\leo-im-notification\\src\\test\\java\\org\\leo\\im\\notification\\AppTest.java\n"
  },
  {
    "path": "leo-im-notification/target/surefire-reports/TEST-org.leo.im.notification.AppTest.xml",
    "chars": 5603,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<testsuite tests=\"1\" failures=\"0\" name=\"org.leo.im.notification.AppTest\" time=\"0"
  }
]

// ... and 157 more files (download for full content)

About this extraction

This page contains the full source code of the lining90567/leo-im-server GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 357 files (517.4 KB), approximately 150.7k tokens, and a symbol index with 1012 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!