https://issues.apache.org/jira/browse/AMQ-3135 - add remote address to connection info advisory

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1103673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-05-16 10:17:14 +00:00
parent 52d5189698
commit b5579ac1ca
2 changed files with 11 additions and 0 deletions

View File

@ -687,6 +687,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
this.manageable = info.isManageable();
state.setContext(context);
state.setConnection(this);
info.setClientIp(getRemoteAddress());
try {
broker.addConnection(context, info);

View File

@ -29,6 +29,7 @@ public class ConnectionInfo extends BaseCommand {
protected ConnectionId connectionId;
protected String clientId;
protected String clientIp;
protected String userName;
protected String password;
protected BrokerId[] brokerPath;
@ -68,6 +69,7 @@ public class ConnectionInfo extends BaseCommand {
copy.clientMaster = clientMaster;
copy.transportContext = transportContext;
copy.faultTolerant= faultTolerant;
copy.clientIp = clientIp;
}
/**
@ -228,4 +230,12 @@ public class ConnectionInfo extends BaseCommand {
public void setFailoverReconnect(boolean failoverReconnect) {
this.failoverReconnect = failoverReconnect;
}
public String getClientIp() {
return clientIp;
}
public void setClientIp(String clientIp) {
this.clientIp = clientIp;
}
}