1 18 package org.apache.activemq.openwire.v1; 19 20 import java.io.DataInputStream ; 21 import java.io.DataOutputStream ; 22 import java.io.IOException ; 23 24 import org.apache.activemq.openwire.*; 25 import org.apache.activemq.command.*; 26 27 28 39 public class ConnectionInfoTest extends BaseCommandTestSupport { 40 41 42 public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); 43 44 public Object createObject() throws Exception { 45 ConnectionInfo info = new ConnectionInfo(); 46 populateObject(info); 47 return info; 48 } 49 50 51 protected void populateObject(Object object) throws Exception { 52 super.populateObject(object); 53 ConnectionInfo info = (ConnectionInfo) object; 54 info.setConnectionId(createConnectionId("ConnectionId:1")); 55 info.setClientId("ClientId:2"); 56 info.setPassword("Password:3"); 57 info.setUserName("UserName:4"); 58 59 { 60 BrokerId value[] = new BrokerId[2]; 61 for( int i=0; i < 2; i++ ) { 62 value[i] = createBrokerId("BrokerPath:5"); 63 } 64 info.setBrokerPath(value); 65 } 66 info.setBrokerMasterConnector(true); 67 info.setManageable(false); 68 69 } 70 } 71 | Popular Tags |