Giter Site home page Giter Site logo

hipchat-java's People

Contributors

bmatthias avatar evanwong avatar hikoma avatar jfricke avatar kdwodc avatar michaelruhwedel avatar rodmidde avatar tyutyutyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hipchat-java's Issues

Unrecognized fields should be ignored.

In Request.java, this line should be added in order to prevent the client from failing if Atlassian adds new fields:

this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

Currently I am getting this exception:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "version" (class io.evanwong.oss.hipchat.v2.rooms.RoomItem), not marked as ignorable (3 known properties: "links", "id", "name"])

Compilation errors in the provided sample code

Tried your sample code in the readme file.

String defaultAccessToken = "22222-mytoken";
HipChatClient client = new HipChatClient(defaultAccessToken);
SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("room-test-1","this is my first message");
java.util.concurrent.Future future;
future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute();

and got the following compilation errors in the last line of code;
- The type io.evanwong.oss.hipchat.v2.commons.Request cannot be resolved. It is indirectly referenced from
required .class files
- The method execute() is undefined for the type SendRoomNotificationRequest
hip-chat-error

quick reply is much appreciated.
thanks in advance.

Java 7 support?!

Many of us still uses Java 7, especially in old projects. Would be possible to make a Java 7 compatible jar?

The example given in the README does not work

hi!

I am using the example in the readme, but it does not work:

        try {
            String defaultAccessToken = "xxxxx";
            HipChatClient client = new HipChatClient(defaultAccessToken);

            SendRoomNotificationRequestBuilder builder = client.prepareSendRoomNotificationRequestBuilder("test", "hello world!");


            Future<NoContent> future = builder.setColor(MessageColor.YELLOW).setNotify(true).build().execute();
//optional... if you want/need to inspect the result:
            NoContent noContent = future.get();
        } catch(Exception e) {
            LOG.error("exception", e);
        }

this is returning:

2015-03-13 14:11:29,821 ERROR [-1:?] [io.evanwong.oss.hipchat.v2.commons.PostRequest] Invalid response status: 401, content: {
  "error": {
    "code": 401,
    "message": "Invalid OAuth session",
    "type": "Unauthorized"
  }
}

And I do not see any OAUTH related methods on the HipChat client.

how do I get this to work? What am I doing wrong?

Java7 release of 0.4.2?

Hi,
first of all thank you for maintaining a backwards compatible version of the API.
We could use the User API which the 0.4.0 of the Java 7 release does not provide yet.
Could you please release the new version to Maven central?

Thanks and cheers,
Michael

Memory leaks (threads)

I recently integrated this library (v0.3.0) in an existing project, where I was using v1 hipchat API. Here is more or less how I use it : I have a static HipChat object in method in MyClass

private static final HipChatClient hcc = new HipChatClient("mytoken") ;
private static void sendMessageImpl(String message, MessageColor color,boolean critical) {
    //some stuff then prepare the query
    SendRoomNotificationRequestBuilder builder = hcc.prepareSendRoomNotificationRequestBuilder("myroomId", "message to send");
    Future<NoContent> future = builder.setColor(colorToUse).setNotify(notify).build().execute();
            NoContent noContent = future.get();

I have a timer that calls MyCalls.sendMessageImpl(...) every two minutes, multiple times.

I recently started to receive reports of memory leaks happening. A further investigation with JProfiler revealed that I had a steadily growing number of new threads (blocked) .

After some hours the number of threads was in the order of thousands, and in 48 hours, boom.

Interestingly enough, when turning hipchat off, the number of threads is steady , as it should be : 6.

Am I doing something wrong? is this a known problem? am I using an old version? It consumed one day of work finding this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.