Package org.jrd.agent

Class Main


  • public final class Main
    extends java.lang.Object
    This class contains agent's premain and agentmain methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String ADDRESS_STRING  
      private static java.lang.String hostname  
      private static java.lang.Integer port  
      private static java.lang.String PORT_STRING  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Main()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void agentmain​(java.lang.String args, java.lang.instrument.Instrumentation inst)
      This method only calls the premain
      static void premain​(java.lang.String agentArgs, java.lang.instrument.Instrumentation inst)
      Premain method is executed when the agent is loaded.
      • Methods inherited from class java.lang.Object

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

      • hostname

        private static java.lang.String hostname
      • port

        private static java.lang.Integer port
    • Constructor Detail

      • Main

        private Main()
    • Method Detail

      • premain

        public static void premain​(java.lang.String agentArgs,
                                   java.lang.instrument.Instrumentation inst)
        Premain method is executed when the agent is loaded. It sets the port and host name from agentArgs and starts the listener thread.
        Parameters:
        agentArgs - arguments with parameters for listener
        inst - instance of instrumentation of given VM
      • agentmain

        public static void agentmain​(java.lang.String args,
                                     java.lang.instrument.Instrumentation inst)
        This method only calls the premain
        Parameters:
        args - arguments with parameters for listener
        inst - instance of instrumentation of given VM