|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.neeve.toa.service.ToaService
public class ToaService
Models a Topic Oriented Application service.
| Field Summary | |
|---|---|
protected static Tracer |
_tracer
|
static String |
PROP_PREFIX_CHANNEL_NAMES
Runtime property name to override whether or not channel names are prefixed with their service name. |
| Constructor Summary | |
|---|---|
ToaService(Date lastModified,
String namespace,
String name,
boolean prefixChannelNames)
|
|
| Method Summary | |
|---|---|
void |
addMessageModel(com.neeve.adm.AdmModel model)
Adds an ADM model to this service. |
boolean |
equals(Object other)
Returns true if the provided object is a ToaService with
the same fully qualified name. |
boolean |
equals(ToaService other)
Returns true if the provided service has the same fully qualified name. |
Collection<com.neeve.adm.AdmFactory> |
getAdmFactories()
Returns the collection of factories used by the service. |
Collection<ToaServiceChannel> |
getChannels()
Returns the collection of channels defined for the service The caller should not modify the returned collection. |
ToaServiceChannel |
getDefaultChannel()
|
Date |
getLastModified()
Returns the last modification time for this service. |
Collection<com.neeve.adm.AdmModel> |
getMessageModels()
Returns the collection of ADM Message models declared by the service. |
String |
getName()
Returns the fully qualified name of this service. |
String |
getNameSpace()
Returns the service's namespace. |
String |
getSimpleName()
Returns the service's simple name. |
ToaServiceToRole |
getToRole(String roleName)
Looks up a 'To' role by name. |
Collection<ToaServiceToRole> |
getToRoles()
Returns the collection of 'To' roles defined for the service The caller should not modify the returned collection. |
int |
hashCode()
The hashCode for a ToaService is the same as
the hashcode for its fully qualifed name. |
boolean |
isPrefixChannelNames()
|
String |
toString()
|
static ToaService |
unmarshal(URL url)
Unmarshals a toa service model from the service xml at the given url. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_PREFIX_CHANNEL_NAMES
When an application uses multiple services there is a risk that channels with the same in two different services would conflict with one another. To reduce the chances of this happening the service xml defaults to prefixing the channel name with the service name. For example consider teh following two service definition snippets:
<Service xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.neeveresearch.com/schema/x-tsml"
namespace="com.neeve.toa.example.orders"
name="OrderProcessorService">
<Models>
<Model file="com/neeve/toa/example/orders/orderMessages.xml"/>
</Models>
<Channels>
<Channel name="Rejects" key="orderprocessing/rejects"/>
</Channels>
<Messages>
</Messages>
</Service>
and
<Service xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.neeveresearch.com/schema/x-tsml"
namespace="com.neeve.toa.example.shipping"
name="ShippingService">
<Models>
<Model file="com/neeve/toa/example/orders/shippingMessages.xml"/>
</Models>
<Channels>
<Channel name="Rejects" key="shipping/rejects"/>
</Channels>
</Service>
In the above case both services define a channel named 'Rejects' which map to different underling
topics. To avoid a conflict between the 2 channels, Hornet, by default will prefix the channel names
with the unqualified service name in lower case so that one ends up with:
Property name: "nv.toa.prefixchannelnames"
Default value: Value read from service definition.
protected static final Tracer _tracer
| Constructor Detail |
|---|
public ToaService(Date lastModified,
String namespace,
String name,
boolean prefixChannelNames)
| Method Detail |
|---|
public Date getLastModified()
public void addMessageModel(com.neeve.adm.AdmModel model)
model - The model to add.public String getSimpleName()
public String getNameSpace()
public String getName()
public ToaServiceChannel getDefaultChannel()
public boolean isPrefixChannelNames()
public Collection<com.neeve.adm.AdmModel> getMessageModels()
The caller should not modify the returned collection.
public Collection<com.neeve.adm.AdmFactory> getAdmFactories()
The caller should not modify the returned collection.
public Collection<ToaServiceChannel> getChannels()
The caller should not modify the returned collection.
public Collection<ToaServiceToRole> getToRoles()
The caller should not modify the returned collection.
public ToaServiceToRole getToRole(String roleName)
roleName - the role name.
null if none exists.public boolean equals(Object other)
ToaService with
the same fully qualified name.
equals in class Objectother - the object with which to compare.public int hashCode()
ToaService is the same as
the hashcode for its fully qualifed name.
hashCode in class Objectpublic final boolean equals(ToaService other)
other - the object with which to compare.
public static final ToaService unmarshal(URL url)
throws Exception
url - The url pointing to an
ToaService
Exception - If there is an error unmarshalling the xml.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||