mirror of
https://gitee.com/xchao/j-im.git
synced 2024-12-02 20:08:23 +08:00
登录命令扩展增加成功与失败的回调方法,用户定制更加灵活
This commit is contained in:
parent
52cadc63fc
commit
12c81c7d0a
73
jim-client/jim-client.iml
Normal file
73
jim-client/jim-client.iml
Normal file
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="jim-common" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-core:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-utils:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.0.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:4.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.7.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:3.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: nl.basjes.parse.useragent:yauaa:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: args4j:args4j:2.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.typesafe:config:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jfinal:jfinal:3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cglib:cglib-nodep:3.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.oschina.j2cache:j2cache-core:2.3.21-release" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.35" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:2.14.2" level="project" />
|
||||
</component>
|
||||
</module>
|
71
jim-common/jim-common.iml
Normal file
71
jim-common/jim-common.iml
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-core:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-utils:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.0.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:4.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.7.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:3.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: nl.basjes.parse.useragent:yauaa:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: args4j:args4j:2.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.typesafe:config:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jfinal:jfinal:3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cglib:cglib-nodep:3.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.oschina.j2cache:j2cache-core:2.3.21-release" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.35" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:2.14.2" level="project" />
|
||||
</component>
|
||||
</module>
|
12
jim-parent/jim-parent.iml
Normal file
12
jim-parent/jim-parent.iml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
78
jim-server-demo/jim-server-demo.iml
Normal file
78
jim-server-demo/jim-server-demo.iml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="jim-server" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="module" module-name="jim-common" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-core:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-utils:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.0.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:4.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.7.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:3.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: nl.basjes.parse.useragent:yauaa:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: args4j:args4j:2.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.typesafe:config:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.oschina.j2cache:j2cache-core:2.3.21-release" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.35" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:2.14.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.lukehutch:fast-classpath-scanner:2.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.5.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jfinal:jfinal:3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cglib:cglib-nodep:3.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.10.3" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -22,14 +22,10 @@ import org.jim.server.command.handler.processor.handshake.WsHandshakeProcessor;
|
||||
*/
|
||||
public class DemoWsHandshakeProcessor extends WsHandshakeProcessor{
|
||||
|
||||
/**
|
||||
* WS握手方法,返回Null则业务层不同意握手,断开连接!
|
||||
*/
|
||||
@Override
|
||||
public ImPacket handshake(ImPacket packet, ChannelContext channelContext) throws Exception {
|
||||
public void onAfterHandshaked(ImPacket packet, ChannelContext channelContext) throws Exception {
|
||||
WsRequestPacket wsRequestPacket = (WsRequestPacket) packet;
|
||||
WsSessionContext wsSessionContext = (WsSessionContext) channelContext.getAttribute();
|
||||
if (wsRequestPacket.isHandShake()) {
|
||||
LoginReqHandler loginHandler = (LoginReqHandler)CommandManager.getCommand(Command.COMMAND_LOGIN_REQ);
|
||||
HttpRequest request = wsSessionContext.getHandshakeRequestPacket();
|
||||
String username = request.getParams().get("username") == null ? null : (String)request.getParams().get("username")[0];
|
||||
@ -40,14 +36,5 @@ public class DemoWsHandshakeProcessor extends WsHandshakeProcessor{
|
||||
request.setBody(loginBytes);
|
||||
request.setBodyString(new String(loginBytes,HttpConst.CHARSET_NAME));
|
||||
Object loginResponse = loginHandler.handler(request, channelContext);
|
||||
if(loginResponse == null)
|
||||
return null;
|
||||
WsResponsePacket wsResponsePacket = new WsResponsePacket();
|
||||
wsResponsePacket.setHandShake(true);
|
||||
wsResponsePacket.setCommand(Command.COMMAND_HANDSHAKE_RESP);
|
||||
wsSessionContext.setHandshaked(true);
|
||||
return wsResponsePacket;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -26,23 +26,5 @@ public class ImDemoAioListener extends ImServerAioListener{
|
||||
|
||||
@Override
|
||||
public void onAfterSent(ChannelContext channelContext, Packet packet, boolean isSentSuccess) {
|
||||
if(packet instanceof ImPacket){
|
||||
ImPacket imPacket = (ImPacket)packet;
|
||||
if(imPacket.getCommand() == Command.COMMAND_LOGIN_RESP || imPacket.getCommand() == Command.COMMAND_HANDSHAKE_RESP){//首次登陆;
|
||||
ImSessionContext imSessionContext = (ImSessionContext)channelContext.getAttribute();
|
||||
User user = imSessionContext.getClient().getUser();
|
||||
if(user.getGroups() != null){
|
||||
for(Group group : user.getGroups()){//发送加入群组通知
|
||||
ImPacket groupPacket = new ImPacket(Command.COMMAND_JOIN_GROUP_REQ,JsonKit.toJsonBytes(group));
|
||||
try {
|
||||
JoinGroupReqHandler joinGroupReqHandler = CommandManager.getCommand(Command.COMMAND_JOIN_GROUP_REQ, JoinGroupReqHandler.class);
|
||||
joinGroupReqHandler.joinGroupNotify(groupPacket, channelContext);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,14 @@ import java.util.UUID;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jim.common.Const;
|
||||
import org.jim.common.ImPacket;
|
||||
import org.jim.common.ImSessionContext;
|
||||
import org.jim.common.packets.Command;
|
||||
import org.jim.common.utils.JsonKit;
|
||||
import org.jim.server.command.CommandManager;
|
||||
import org.jim.server.command.handler.JoinGroupReqHandler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.tio.core.ChannelContext;
|
||||
import org.jim.common.http.HttpConst;
|
||||
import org.jim.common.packets.Group;
|
||||
@ -28,6 +35,8 @@ import cn.hutool.core.util.RandomUtil;
|
||||
*/
|
||||
public class LoginServiceProcessor implements LoginProcessorIntf{
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(LoginServiceProcessor.class);
|
||||
|
||||
public static final Map<String, User> tokenMap = new HashMap<>();
|
||||
|
||||
private static String[] familyName = new String[] { "谭", "刘", "张", "李", "胡", "沈", "朱", "钱", "王", "伍", "赵", "孙", "吕", "马", "秦", "毛", "成", "梅", "黄", "郭", "杨", "季", "童", "习", "郑",
|
||||
@ -119,6 +128,29 @@ public class LoginServiceProcessor implements LoginProcessorIntf{
|
||||
return this.getUser(loginname, password);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(ChannelContext channelContext) {
|
||||
logger.info("登录成功回调方法");
|
||||
ImSessionContext imSessionContext = (ImSessionContext)channelContext.getAttribute();
|
||||
User user = imSessionContext.getClient().getUser();
|
||||
if(user.getGroups() != null){
|
||||
for(Group group : user.getGroups()){//发送加入群组通知
|
||||
ImPacket groupPacket = new ImPacket(Command.COMMAND_JOIN_GROUP_REQ,JsonKit.toJsonBytes(group));
|
||||
try {
|
||||
JoinGroupReqHandler joinGroupReqHandler = CommandManager.getCommand(Command.COMMAND_JOIN_GROUP_REQ, JoinGroupReqHandler.class);
|
||||
joinGroupReqHandler.joinGroupNotify(groupPacket, channelContext);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(ChannelContext channelContext) {
|
||||
logger.info("登录失败回调方法");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isProtocol(ChannelContext channelContext) {
|
||||
|
||||
|
77
jim-server/jim-server.iml
Normal file
77
jim-server/jim-server.iml
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="module" module-name="jim-common" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-core:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.t-io:tio-utils:2.4.0.v20180508-RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.0.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:4.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.24.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.7.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.8.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:3.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: nl.basjes.parse.useragent:yauaa:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: args4j:args4j:2.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.typesafe:config:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.oschina.j2cache:j2cache-core:2.3.21-release" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.35" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:2.14.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.lukehutch:fast-classpath-scanner:2.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.thoughtworks.paranamer:paranamer:2.5.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jfinal:jfinal:3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: cglib:cglib-nodep:3.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.10.3" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -49,6 +49,7 @@ public class LoginReqHandler extends AbCmdHandler {
|
||||
User user = loginServiceHandler.getUser(loginReqBody,channelContext);
|
||||
if (user == null ) {
|
||||
log.info("登录失败, loginname:{}, password:{}", loginReqBody.getLoginname(), loginReqBody.getPassword());
|
||||
loginServiceHandler.onFailed(channelContext);
|
||||
Aio.remove(channelContext, "loginname and token is null");
|
||||
return null;
|
||||
}
|
||||
@ -63,6 +64,7 @@ public class LoginReqHandler extends AbCmdHandler {
|
||||
bindUnbindGroup(channelContext, user);//初始化绑定或者解绑群组;
|
||||
loginRespBodyBuilder.setUser(user);
|
||||
loginRespBodyBuilder.setToken(token);
|
||||
loginServiceHandler.onSuccess(channelContext);
|
||||
RespBody respBody = new RespBody(Command.COMMAND_LOGIN_RESP,ImStatus.C10007).setData(loginRespBodyBuilder);
|
||||
return ImKit.ConvertRespPacket(respBody, channelContext);
|
||||
}
|
||||
|
@ -14,4 +14,8 @@ import org.jim.server.command.handler.processor.ProcessorIntf;
|
||||
public interface LoginProcessorIntf extends ProcessorIntf{
|
||||
|
||||
public User getUser(LoginReqBody loginReqBody ,ChannelContext channelContext);
|
||||
|
||||
public void onSuccess(ChannelContext channelContext);
|
||||
|
||||
public void onFailed(ChannelContext channelContext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user