endpoint,
UuidFactory.create("57117a56-2750-11b2-b312-080020c9e4a1"),
false);
InvocationHandler invocationHandler =
new BasicInvocationHandler(objectEndpoint, null);
RemoteMethodControl proxy =
(RemoteMethodControl) Proxy.newProxyInstance(
TestConnectTimeout.class.getClassLoader(),
new Class[] { Ping.class, RemoteMethodControl.class },
invocationHandler);
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
new ConnectionRelativeTime(TIMEOUT),
null
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
ConstraintAlternatives.create(new InvocationConstraint[] {
new ConnectionRelativeTime(TIMEOUT),
new ConnectionRelativeTime(TIMEOUT + 1)
}),
null
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
null,
new ConnectionRelativeTime(TIMEOUT)))));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
null,
ConstraintAlternatives.create(new InvocationConstraint[] {
new ConnectionRelativeTime(TIMEOUT),
new ConnectionRelativeTime(TIMEOUT + 1)
})
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
new ConnectionAbsoluteTime(System.currentTimeMillis()),
null
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
ConstraintAlternatives.create(new InvocationConstraint[] {
new ConnectionAbsoluteTime(System.currentTimeMillis()),
new ConnectionAbsoluteTime(System.currentTimeMillis() + 1)
}),
null
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
null,
new ConnectionAbsoluteTime(System.currentTimeMillis())
))
));
tryProxy(proxy.setConstraints(
new BasicMethodConstraints(new InvocationConstraints(
null,
ConstraintAlternatives.create(new InvocationConstraint[] {
new ConnectionAbsoluteTime(System.currentTimeMillis()),
new ConnectionAbsoluteTime(System.currentTimeMillis() + 1)