Repository: activemq-apollo
Updated Branches:
  refs/heads/trunk 1637f4b51 -> 861d918d0


Add support for getting the intended host name from the WireFormatInfo in 
openwire.


Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/8013addc
Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/8013addc
Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/8013addc

Branch: refs/heads/trunk
Commit: 8013addc33ef16180e01a3c77334484c993bda06
Parents: bb366a2
Author: Hiram Chirino <[email protected]>
Authored: Mon Feb 24 18:54:00 2014 -0500
Committer: Hiram Chirino <[email protected]>
Committed: Mon Feb 24 18:54:07 2014 -0500

----------------------------------------------------------------------
 .../activemq/apollo/openwire/command/WireFormatInfo.java    | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/8013addc/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/WireFormatInfo.java
----------------------------------------------------------------------
diff --git 
a/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/WireFormatInfo.java
 
b/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/WireFormatInfo.java
index c368dec..b1d3107 100644
--- 
a/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/WireFormatInfo.java
+++ 
b/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/WireFormatInfo.java
@@ -29,6 +29,7 @@ import 
org.apache.activemq.apollo.openwire.support.MarshallingSupport;
 import org.fusesource.hawtbuf.Buffer;
 import org.fusesource.hawtbuf.ByteArrayInputStream;
 import org.fusesource.hawtbuf.ByteArrayOutputStream;
+import org.fusesource.hawtbuf.UTF8Buffer;
 
 /**
  * @openwire:marshaller code="1"
@@ -332,4 +333,12 @@ public class WireFormatInfo implements Command, 
MarshallAware {
     public boolean isShutdownInfo() {
         return false;
     }
+
+    public String getHost() throws IOException {
+        return (String) getProperty("Host");
+    }
+
+    public void setHost(String hostname) throws IOException {
+        setProperty("Host", hostname);
+    }
 }

Reply via email to