Package net.uptheinter.interceptify
Class EntryPoint
java.lang.Object
net.uptheinter.interceptify.EntryPoint
This is the entrypoint for setting up interception. In most cases, your application's
main function should create a StartupConfig implementation and then immediately call
entryPoint(StartupConfig, String[])-
Method Summary
Modifier and TypeMethodDescriptionstatic voidagentmain(String args, Instrumentation inst) Placeholder function for future runtime Java Agent registration.static voidentryPoint(StartupConfig cfg, String[] args) This is the entrypoint to Interceptify.static voidpremain(String args, Instrumentation inst) This function should be called by the JVM by setting this class up as a Java Agent.
-
Method Details
-
entryPoint
This is the entrypoint to Interceptify. You generally want to call this immediately from yourmain()function.- Parameters:
cfg- an implementation of StartupConfigargs- These arguments will be passed to the target application's main.
-
premain
This function should be called by the JVM by setting this class up as a Java Agent. See-javaagentfor information.This functionality is currently reserved for future use. Consequently, you are required to initialise this library as a Java Agent. This is primarily to avoid any complaints/problems when this functionality is leveraged in a future version and someone wonders why things don't work because they didn't use
-javaagenton an older version.- Parameters:
args- args from the JVM via-javaagentinst- an instance ofInstrumentation, incidentally, also passed by the JVM.
-
agentmain
Placeholder function for future runtime Java Agent registration.- Parameters:
args- args from the JVMinst- anInstrumentationinstance from the JVM
-