Open topic with navigation

TIBCO GridServer® 7.1.0

# Running a Service by Using SpeedLink

Almost any GridServer Service can be executed by using SpeedLink. You can use an existing `ServiceType` and its Grid Libraries. All you need to do to run a Service by using SpeedLink is, in the client code, replace the `ServiceFactory` class with `SpeedLinkServiceFactory`, and `ServiceInvocationHandler` with `SpeedLinkInvocationHandler`.

The factory class returns an object of type `SpeedLinkService`, which extends the `Service` interface. The most important feature of the new type is that it enables access to detailed reporting information. If you are not interested in this information but might to have interchangeability with standard Services, you can instead use the `Service` interface. This factory class also has all additional options needed for the Service declared as string constants.

This example creates a factory object and synchronously calls a Service implementation in Java:

    // Create a Service instance of JavaAdderExample
    Service s =
        SpeedLinkServiceFactory.getInstance().createService(
            "JavaAdderExample", initData, options, description,
            condition);
    ..........
    // Perform Synchronous add
    Object[] arguments = new Object[] { new Double(5), new Double(6) };
    Double sum = (Double)s.execute("add", arguments);
    System.out.println("Result of add: " + sum);

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO GridServer®

Copyright © 2001-2022. TIBCO Software Inc. All Rights Reserved.