Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-devicemonitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 15523b89
authored
May 10, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加ICE连接测试用例
1 parent
fd4ba63e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
src/test/java/cn/com/glsx/test/ICETest.java
src/test/java/cn/com/glsx/test/ICETest.java
0 → 100644
View file @
15523b8
package
cn
.
com
.
glsx
.
test
;
import
Ice.ObjectPrx
;
import
cn.com.glsx.devicemonitor.iceprotocol.resident.FspServicePrx
;
import
cn.com.glsx.devicemonitor.iceprotocol.resident.FspServicePrxHelper
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author Yanglinlong
* @date 2022/1/15 17:09
*/
@Slf4j
public
class
ICETest
{
public
static
void
main
(
String
[]
args
)
{
boolean
init
=
false
;
try
{
String
host
=
"192.168.3.101"
;
String
port
=
"30060"
;
String
arrayHost
[]
=
{
host
,
port
};
Ice
.
Communicator
ic
=
Ice
.
Util
.
initialize
(
arrayHost
);
String
lbsPxyStr
=
"FspService:default -h "
+
host
+
" -p "
+
port
;
log
.
info
(
"常驻地调用地址1:"
+
lbsPxyStr
);
ObjectPrx
base
=
ic
.
stringToProxy
(
lbsPxyStr
);
log
.
info
(
"常驻地调用地址2:"
+
lbsPxyStr
);
FspServicePrx
fspServicePrx
=
FspServicePrxHelper
.
checkedCast
(
base
);
if
(
null
==
fspServicePrx
)
{
log
.
info
(
"Invalid proxy"
);
}
else
{
init
=
true
;
log
.
info
(
"Query Resident Ice Init Success!"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
System
.
out
.
println
(
"init = "
+
init
);
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment