Package edu.sc.seis.sod.source
Class AbstractSource
java.lang.Object
edu.sc.seis.sod.source.AbstractSource
- All Implemented Interfaces:
Source
- Direct Known Subclasses:
AbstractCSVSource
,AbstractEventSource
,AbstractNetworkSource
,ConstantSeismogramSourceLocator
,PeriodicFakeEventSource
,SimpleEventSource
public abstract class AbstractSource extends java.lang.Object implements Source
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
name
static java.lang.String
NAME_ELEMENT
static java.lang.String
RETRIES_ELEMENT
-
Constructor Summary
Constructors Constructor Description AbstractSource(java.lang.String name)
AbstractSource(java.lang.String name, int retries)
AbstractSource(org.w3c.dom.Element config, java.lang.String defaultName)
AbstractSource(org.w3c.dom.Element config, java.lang.String defaultName, int defaultRetries)
-
Method Summary
Modifier and Type Method Description void
appendToName(java.lang.String suffix)
Allows name to be appended to in case of conflicts with other sources.java.lang.String
getName()
returns the name of the server.int
getRetries()
RetryStrategy
getRetryStrategy()
void
setRetryStrategy(RetryStrategy retryStrategy)
-
Field Details
-
name
protected java.lang.String name -
NAME_ELEMENT
public static final java.lang.String NAME_ELEMENT- See Also:
- Constant Field Values
-
RETRIES_ELEMENT
public static final java.lang.String RETRIES_ELEMENT- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractSource
public AbstractSource(java.lang.String name) -
AbstractSource
public AbstractSource(java.lang.String name, int retries) -
AbstractSource
public AbstractSource(org.w3c.dom.Element config, java.lang.String defaultName) -
AbstractSource
public AbstractSource(org.w3c.dom.Element config, java.lang.String defaultName, int defaultRetries)
-
-
Method Details
-
getName
public java.lang.String getName()Description copied from interface:Source
returns the name of the server. The name to which the server's servant instance is bound in the CORBA naming service. For non-corba servers, this string can be anything that seems reasonable and is relatively unique -
getRetries
public int getRetries()- Specified by:
getRetries
in interfaceSource
-
getRetryStrategy
-
setRetryStrategy
-
appendToName
public void appendToName(java.lang.String suffix)Description copied from interface:Source
Allows name to be appended to in case of conflicts with other sources.- Specified by:
appendToName
in interfaceSource
-