Class TptApiUtils


  • public class TptApiUtils
    extends java.lang.Object
    This class contains static utility methods that can be used when working with the TPT RMI API.
    Author:
    Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
    • Constructor Summary

      Constructors 
      Constructor Description
      TptApiUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TptApi connect​(java.lang.String binding, int port)
      Connect to TPT api with the given binding name and port.
      static TptApi connect​(java.lang.String binding, java.lang.String hostname, int port)
      Connect to TPT api with the given binding name and port.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TptApiUtils

        public TptApiUtils()
    • Method Detail

      • connect

        public static TptApi connect​(java.lang.String binding,
                                     java.lang.String hostname,
                                     int port)
                              throws java.rmi.RemoteException,
                                     java.rmi.NotBoundException
        Connect to TPT api with the given binding name and port.
        Parameters:
        binding - The binding name to be used for lookup. This should match the configuration in TPT via the Preference page "TPT API".
        hostname - The host name to connect to. Most of the time this will be "localhost".
        port - The port to connect to. This should match the configuration in TPT via the Preference page "TPT API".
        Returns:
        The {link: TptApi} object which is the root object for all further operations with the TPT API
        Throws:
        java.rmi.RemoteException - remote communication problem
        java.rmi.NotBoundException - If There is no binding with the given binding name
      • connect

        public static TptApi connect​(java.lang.String binding,
                                     int port)
                              throws java.rmi.RemoteException,
                                     java.rmi.NotBoundException
        Connect to TPT api with the given binding name and port. As hostname "localhost" is assumed.
        Parameters:
        binding - The binding name to be used for lookup. This should match the configuration in TPT via the Preference page "TPT API".
        port - The port to connect to. This should match the configuration in TPT via the Preference page "TPT API".
        Returns:
        The {link: TptApi} object which is the root object for all further operations with the TPT API
        Throws:
        java.rmi.RemoteException - remote communication problem
        java.rmi.NotBoundException - If There is no binding with the given binding name