Dropship Agent Library

Library to aid in the development of Dropship friendly agents

Лицензия

Лицензия

Группа

Группа

com.zulily.dropship
Идентификатор

Идентификатор

dropship-agent
Последняя версия

Последняя версия

0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Dropship Agent Library
Library to aid in the development of Dropship friendly agents
Ссылка на сайт

Ссылка на сайт

https://github.com/zulily/dropship-agent
Организация-разработчик

Организация-разработчик

zulily, Inc.
Система контроля версий

Система контроля версий

http://github.com/zulily/dropship-agent

Скачать dropship-agent

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.zulily.dropship/dropship-agent/ -->
<dependency>
    <groupId>com.zulily.dropship</groupId>
    <artifactId>dropship-agent</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.zulily.dropship/dropship-agent/
implementation 'com.zulily.dropship:dropship-agent:0.1'
// https://jarcasting.com/artifacts/com.zulily.dropship/dropship-agent/
implementation ("com.zulily.dropship:dropship-agent:0.1")
'com.zulily.dropship:dropship-agent:jar:0.1'
<dependency org="com.zulily.dropship" name="dropship-agent" rev="0.1">
  <artifact name="dropship-agent" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zulily.dropship', module='dropship-agent', version='0.1')
)
libraryDependencies += "com.zulily.dropship" % "dropship-agent" % "0.1"
[com.zulily.dropship/dropship-agent "0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.javassist : javassist jar 3.18.1-GA

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.easytesting : fest-assert jar 1.4

Модули Проекта

Данный проект не имеет модулей.

dropship-agent

Library for aiding in the development of "agents" or "plugins" for dropship.

What For?

Implement a dropship agent if you wish to have code that runs before and after your target application. For example, you may wish to start up some threads that send JMX metrics to statsd.

How?

BaseAgent provides methods to configure basic interaction with the Dropship lifecycle. Instances of subclasses of BaseAgent are wired in to the preRun, onError and onExit methods of Dropship.

To build a Dropship agent,

  1. Extend BaseAgent
    • Implement onStart(Properties, String, Class, Method, Object[]) - which will be invoked just before Dropship hands control over to the target
    • Implement onError(Throwable) - which will be invoked in the event of an exception from the target (or an unhandled exception in any threads).
    • Implement onExit(), which will be invoked as Dropship is shutting down
  2. Create a public static void premain(String agentArgument, Instrumentation instrumentation) method
    • In it, instantiate your agent
    • Pass that instance to premain(String, Instrumentation, BaseAgent)
  3. Package your agent as a jar file. You will probably want to create a "shaded" jar
  4. Add a Premain-Class entry to the MANIFEST.MF in your jar file
  5. Use your agent from the command line: java -javaagent:youragent.jar -jar dropship.jar ...

License

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 at

   http://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.
com.zulily.dropship

zulily

Версии библиотеки

Версия
0.1