Can retrieve endpoint information from cache instead of querying AES?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sato15
    Member
    .
    • May 2019
    • 3

    Can retrieve endpoint information from cache instead of querying AES?

    This is JTAPI.
    We are currently using the following method to obtain the endpoint information of a terminal (associated with an extension):
    ```javaV11RegisteredEndpointInfo[] regEndpointInfos = luAddress.getRegisteredEndpoints();```
    However, this method always queries the AES server, which causes slow response times.We would like to confirm whether there is any JTAPI method that can retrieve endpoint information from cache instead of querying AES directly —
    for example:
    ```javaV11RegisteredEndpointInfo[] regEndpointInfos = luAddress.getTSDevice().getRegisteredEndpoints(fal se);```
    If such a method exists, could you please provide information on its availability and correct usage?
  • avc937321889308
    Aspiring Member
    • Dec 2025
    • 1

    #2
    The TSDevice class has this method:

    public V11RegisteredEndpointInfo[] getRegisteredEndpoints(boolean query) throws TsapiMethodNotSupportedException {
    if (query) {
    return this.getRegisteredEndpoints(); // Queries AES
    }
    return this.registeredEndpoints.toArray(new V11RegisteredEndpointInfo[0]); // Returns cache
    }

    How to Access It

    Since `getTSDevice()` is a public method in `TsapiAddress`, you can access it like this:

    // Get cached endpoints (no AES query)
    V11RegisteredEndpointInfo[] cachedEndpoints = luAddress.getTSDevice().getRegisteredEndpoints(fal se);

    // Query AES and update cache
    V11RegisteredEndpointInfo[] freshEndpoints = luAddress.getTSDevice().getRegisteredEndpoints(tru e);

    Important Notes

    1. __Cache Population__: The cache is populated during address monitoring and snapshots. If you haven't set up monitoring, the cache may be empty.

    2. __Cache Freshness__: The cache may not reflect real-time changes unless you have active monitoring set up on the address.

    3. __Public API__: While `getTSDevice()` is public, the `getRegisteredEndpoints(boolean)` method is part of the internal implementation. However, it's accessible and functional.

    4. __Performance Benefit__: Using `getRegisteredEndpoints(false)` will be significantly faster as it avoids network latency to AES.

    Recommendation

    For performance-critical scenarios where real-time accuracy isn't essential, use:

    V11RegisteredEndpointInfo[] endpoints = luAddress.getTSDevice().getRegisteredEndpoints(fal se);

    This will retrieve endpoint information from the internal cache without querying the AES server, resulting in much faster response times.

    Comment

    Loading