Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhongl/lurker
Lurker is a tiny common java agent, it is incubate from HouseMD.
https://github.com/zhongl/lurker
Last synced: 3 days ago
JSON representation
Lurker is a tiny common java agent, it is incubate from HouseMD.
- Host: GitHub
- URL: https://github.com/zhongl/lurker
- Owner: zhongl
- License: apache-2.0
- Created: 2013-06-20T04:07:09.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-02-27T06:02:40.000Z (almost 4 years ago)
- Last Synced: 2024-11-05T10:57:24.462Z (about 2 months ago)
- Language: Java
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Lurker is a tiny common [java agent][0], it is incubate from [HouseMD][1].
[0]:https://www.google.com/search?q=java+agent
[1]:https://github.com/csug/housemd## Usage
### Run as javaagent
> java -javaagent:lurker.jar= ...
### Run for attaching
> java -Xbootclasspath/a:$JAVA_HOME/lib/tools.jar -jar lurker.jar
> Tips: In Mac OSX and using JDK6, `-Xbootclasspath/a:$JAVA_HOME/lib/tools.jar ` should be ignored.
### URL
The `url` should provide three informations:
1. The `classpath` which can load the `real agent class`;
2. The `real agent class` name;
3. The optional configurations.A example of `url` is:
http://hostname/classpath?bootstrap=real.XXXAgent&key=value
`curl` the `url`, a text content of classpath should be return, it could tell lurker where to load the classes.
`real.XXXAgent` is the `real agent class` , which lurker should bootstrap first.
Then, `key=value` would be configuration for instancing `real.XXXAgent`.
## Real Agent Class
Every `real agent class` should have:
1. A public constructor;
2. A public void method named `apply` without any arguments.The public constructor may have one or two arguments, like:
```
package real;public class SimpleAgent {
public SimpleAgent() { ... }
public void apply() { ... }
}
public class ConfigurableAgent {
public ConfigurableAgent(Map conf) { ... }public void apply() { ... }
}
public class InstrumentationAgent {
public InstrumentationAgent(Instrumentation inst) { ... }public void apply() { ... }
}
public class SuperAgent {
public SuperAgent(Map conf, Instrumentation inst) { ... }public void apply() { ... }
}
```## Copyright and license
Copyright 2013 zhongl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.