Biblioteca Java - Rev 31
Subversion Repositories:
(root)/Frameworks and Technologies/TestActiveMQ2/src/main/java/com/linkscreens/activemq/protocol/MessageProtocolFactory.java
package com.linkscreens.activemq.protocol;
/**
* Created by evo2 on 7/29/2015.
*/
public class MessageProtocolFactory {
public static MessageProtocol GetMessageProtocol(ProtocolType type){
switch (type) {
case ECHO:
return new EchoMessageProtocol();
case DUMMY:
return new DummyMessageProtocol();
default:
throw new IllegalArgumentException("Unknown protocol type speciffied.");
}
}
}
/**
* Created by evo2 on 7/29/2015.
*/
public class MessageProtocolFactory {
public static MessageProtocol GetMessageProtocol(ProtocolType type){
switch (type) {
case ECHO:
return new EchoMessageProtocol();
case DUMMY:
return new DummyMessageProtocol();
default:
throw new IllegalArgumentException("Unknown protocol type speciffied.");
}
}
}