YaroslavGaponov / StompLib

STOMP client library for Java
12 stars 4 forks source link

add StompClient authentication support #3

Closed conanca closed 12 years ago

conanca commented 12 years ago

class StompClient add two field

private final String username;
private final String password;

than, constructor function add the two para.

edit the connect() function like this:

StompFrame connectFrame = new StompFrame(StompCommand.CONNECT);
if (null != username && password != null) {
        connectFrame.header.put("login", username);
        connectFrame.header.put("passcode", password);
    }
this.sendFrame(connectFrame);
YaroslavGaponov commented 12 years ago

i added support authentication. thanks