private void checkExtension() { if (extension == null) { throw new Fabric3Exception("Channel proxy service extension not installed"); } }
private void checkExtension() { if (extension == null) { throw new Fabric3Exception("Channel proxy service extension not installed"); } }
@Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (processor != null ? processor.hashCode() : 0); result = 31 * result + (minVersion != null ? minVersion.hashCode() : 0); result = 31 * result + (maxVersion != null ? maxVersion.hashCode() : 0); return result; }
public String transform(Object source, ClassLoader loader) throws Fabric3Exception { try { return mapper.writeValueAsString(source); } catch (IOException e) { throw new Fabric3Exception(e); } }
public void stop() { try { if (stream != null) { stream.close(); stream = null; } } catch (IOException e) { throw new Fabric3Exception(e); } }
private int parseInt(String value, String name) throws Fabric3Exception { try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new Fabric3Exception("Invalid value for " + name, e); } }
public synchronized void register(URI id, ClassLoader classLoader) { if (registry.containsKey(id)) { throw new Fabric3Exception("Duplicate classloader: " + id); } registry.put(id, classLoader); }
public void begin() throws Fabric3Exception { try { tm.begin(); tm.setTransactionTimeout(transactionTimeout); } catch (NotSupportedException | SystemException e) { throw new Fabric3Exception(e); } }
public void rollback(Session session) throws Fabric3Exception { try { session.recover(); } catch (JMSException e) { throw new Fabric3Exception("Error handling message for " + uri, e); } }
private Channel getChannel(URI uri, ChannelSide channelSide) throws Fabric3Exception { Channel channel = channelManager.getChannel(uri, channelSide); if (channel == null) { throw new Fabric3Exception("Channel not found"); } return channel; } }
private void removeRegistry() throws Fabric3Exception { try { if (registry != null) { UnicastRemoteObject.unexportObject(registry, true); } } catch (IOException ex) { throw new Fabric3Exception(ex); } }
public void end(Session session, Message message) throws Fabric3Exception { if (message == null) { // message can be null if the consumer receive loop timed out without returning a message. return; } try { message.acknowledge(); } catch (JMSException e) { throw new Fabric3Exception("Error handling message for " + uri, e); } }
private Channel getChannel(URI uri, ChannelSide channelSide) throws Fabric3Exception { Channel channel = channelManager.getChannel(uri, channelSide); if (channel == null) { throw new Fabric3Exception("Channel not found"); } return channel; } }
public <T> Supplier<T> createSupplier(Class<T> interfaze, ChannelConnection connection) throws Fabric3Exception { if (extension == null) { throw new Fabric3Exception("Channel proxy service extension not installed"); } return extension.createSupplier(interfaze, connection); } }
@SuppressWarnings({"unchecked"}) protected <T> Transformer<T, ?> getTransformer(String name, DataType sourceType, DataType targetType, List<Class<?>> types) { Transformer<T, ?> transformer = (Transformer<T, ?>) transformerRegistry.getTransformer(sourceType, targetType, types, types); if (transformer == null) { throw new Fabric3Exception("No transformer for property " + name + " of type: " + targetType); } return transformer; }
@SuppressWarnings({"unchecked"}) protected <T> Transformer<T, ?> getTransformer(String name, DataType sourceType, DataType targetType, List<Class<?>> types) { Transformer<T, ?> transformer = (Transformer<T, ?>) transformerRegistry.getTransformer(sourceType, targetType, types, types); if (transformer == null) { throw new Fabric3Exception("No transformer for property " + name + " of type: " + targetType); } return transformer; }
public <T> Supplier<T> createSupplier(Class<T> interfaze, ChannelConnection connection) throws Fabric3Exception { if (extension == null) { throw new Fabric3Exception("Channel proxy service extension not installed"); } return extension.createSupplier(interfaze, connection); } }
private void validateDestination(javax.jms.Destination requestDestination, Destination requestDestinationDefinition) throws Fabric3Exception { DestinationType requestDestinationType = requestDestinationDefinition.geType(); if (DestinationType.QUEUE == requestDestinationType && !(requestDestination instanceof Queue)) { throw new Fabric3Exception("Destination is not a queue: " + requestDestinationDefinition.getName()); } else if (DestinationType.TOPIC == requestDestinationType && !(requestDestination instanceof Topic)) { throw new Fabric3Exception("Destination is not a topic: " + requestDestinationDefinition.getName()); } }
private void validateDestination(javax.jms.Destination requestDestination, Destination requestDestinationDefinition) { DestinationType requestDestinationType = requestDestinationDefinition.geType(); if (DestinationType.QUEUE == requestDestinationType && !(requestDestination instanceof Queue)) { throw new Fabric3Exception("Destination is not a queue: " + requestDestinationDefinition.getName()); } else if (DestinationType.TOPIC == requestDestinationType && !(requestDestination instanceof Topic)) { throw new Fabric3Exception("Destination is not a topic: " + requestDestinationDefinition.getName()); } }