Package com.isode.dsapi.internal
Class NettraceUtil
java.lang.Object
com.isode.dsapi.internal.NettraceUtil
Utility class for creating and managing
Nettraces
in dsapi.- Since:
- 16.0
- Author:
- ac
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addObserverForNettrace
(com.isode.nettrace.observers.NettraceObserver observer, String nettracePA) Registers aNettraceObserver
with aNettrace
.static Exception
getLastExceptionForNettrace
(String NettracePA) Returns the lastException
of the givenNettrace
.static String
getPresentationAddressForNettraceOn
(String serverPA) Sets up and starts a Nettrace listing in to a server.static void
releaseNettraceForAddress
(String nettracePA) Shuts down a givenNettrace
.static void
removeObserverForNettrace
(com.isode.nettrace.observers.NettraceObserver observer, String nettracePA) Unregisters aNettraceObserver
with aNettrace
.
-
Constructor Details
-
NettraceUtil
public NettraceUtil()
-
-
Method Details
-
getPresentationAddressForNettraceOn
public static String getPresentationAddressForNettraceOn(String serverPA) throws BadAddressException Sets up and starts a Nettrace listing in to a server.- Parameters:
serverPA
- A string representation of the Presentation Address of the server. This should not be null.- Returns:
- The string representation of the Presentation Address
to connect to the
Nettrace
. This may benull
if there was an error generating the presentation address. - Throws:
BadAddressException
- IfserverPA
is null or not a valid presentation address; of if their is an error generating the presentation address for theNettrace
-
releaseNettraceForAddress
Shuts down a givenNettrace
.- Parameters:
nettracePA
- The Presentation Address of theNettrace
to shutdown. This should not benull
. If their is no correspondingNettrace
registered at the Presentation Address then nothing will be done.
-
addObserverForNettrace
public static void addObserverForNettrace(com.isode.nettrace.observers.NettraceObserver observer, String nettracePA) Registers aNettraceObserver
with aNettrace
.- Parameters:
observer
- TheNettraceObserver
to register. This can benull
in which case nothing will be done.nettracePA
- The presentation address of theNettrace
. This should not benull
. If there is no correspondingNettrace
at this address then nothing will be done.
-
removeObserverForNettrace
public static void removeObserverForNettrace(com.isode.nettrace.observers.NettraceObserver observer, String nettracePA) Unregisters aNettraceObserver
with aNettrace
.- Parameters:
observer
- TheNettraceObserver
to unregister. This can benull
in which case nothing will be done.nettracePA
- The presentation address of theNettrace
. This should not be null. If there is no correspondingNettrace
at this address then nothing will be done.
-
getLastExceptionForNettrace
Returns the lastException
of the givenNettrace
.- Parameters:
NettracePA
- The presentation address of theNettrace
. This should not be null. If there is no correspondingNettrace
at this address then the function will returnnull
- Returns:
- The last
Exception
thrown by theNettrace
, ornull
if it has not thrown any exceptions, or no nettrace exists at the given presentation address.
-