com.neeve.toa.service
Class ToaService

java.lang.Object
  extended by com.neeve.toa.service.ToaService

public class ToaService
extends Object

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()
           
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, toString, wait, wait, wait
 

Field Detail

PROP_PREFIX_CHANNEL_NAMES

public static final String PROP_PREFIX_CHANNEL_NAMES
Runtime property name to override whether or not channel names are prefixed with their service name.

See Also:
Constant Field Values

_tracer

protected static final Tracer _tracer
Constructor Detail

ToaService

public ToaService(Date lastModified,
                  String namespace,
                  String name,
                  boolean prefixChannelNames)
Method Detail

getLastModified

public Date getLastModified()
Returns the last modification time for this service.

Returns:
The last modification time of the service (or the time this class was created if unkown);

addMessageModel

public void addMessageModel(com.neeve.adm.AdmModel model)
Adds an ADM model to this service.

Parameters:
model - The model to add.

getSimpleName

public String getSimpleName()
Returns the service's simple name.

Returns:
The service's unqualified name.

getNameSpace

public String getNameSpace()
Returns the service's namespace.

Returns:
The service's namespace.

getName

public String getName()
Returns the fully qualified name of this service.

Returns:
The service's fully qualified name.

getDefaultChannel

public ToaServiceChannel getDefaultChannel()
Returns:
The default 'To' channel for this service.

isPrefixChannelNames

public boolean isPrefixChannelNames()

getMessageModels

public Collection<com.neeve.adm.AdmModel> getMessageModels()
Returns the collection of ADM Message models declared by the service.

The caller should not modify the returned collection.

Returns:
The service's ADM messaging models

getAdmFactories

public Collection<com.neeve.adm.AdmFactory> getAdmFactories()
Returns the collection of factories used by the service.

The caller should not modify the returned collection.

Returns:
The ADM factories used by the service.

getChannels

public Collection<ToaServiceChannel> getChannels()
Returns the collection of channels defined for the service

The caller should not modify the returned collection.

Returns:
The collection of channels defined for the service

getToRoles

public Collection<ToaServiceToRole> getToRoles()
Returns the collection of 'To' roles defined for the service

The caller should not modify the returned collection.

Returns:
The collection of 'To' roles defined for the service

getToRole

public ToaServiceToRole getToRole(String roleName)
Looks up a 'To' role by name.

Parameters:
roleName - the role name.
Returns:
The role for the given name or null if none exists.

equals

public boolean equals(Object other)
Returns true if the provided object is a ToaService with the same fully qualified name.

Overrides:
equals in class Object
Parameters:
other - the object with which to compare.

hashCode

public int hashCode()
The hashCode for a ToaService is the same as the hashcode for its fully qualifed name.

Overrides:
hashCode in class Object

equals

public final boolean equals(ToaService other)
Returns true if the provided service has the same fully qualified name.

Parameters:
other - the object with which to compare.

unmarshal

public static final ToaService unmarshal(URL url)
                                  throws Exception
Unmarshals a toa service model from the service xml at the given url.

Parameters:
url - The url pointing to an
Returns:
An unmarshalled ToaService
Throws:
Exception - If there is an error unmarshalling the xml.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.