O'Reilly logo

Drools JBoss Rules 5.X Developer's Guide by Michal Bali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementation

In this section we'll define the implementation for various interfaces that we've defined in this chapter. This section is shown for completeness and can be skipped.

First, let's have a look at an implementation of the Message interface. The message is essentially another POJO, so it will basically have getters setters and it will also override the equals, the hashCode, and toString methods.

import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; //... other imports public class DefaultMessage implements Message, Serializable { private Message.Type type; private String messageKey; private List<Object> context; public DefaultMessage(Message.Type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required