|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.client.ServicesEdge
public class ServicesEdge
An instance of this class is a container for a pair of Moby service definitions, and for an information how they can be connected. You can imagine that instances of this class represent edges in a graph of services.
The instances are suitable for creation of graphs, but also, for example, for building automatic clients that exchange data between several services.
ServiceConnections
Field Summary | |
---|---|
static int |
BOTH_COLLECTIONS_CONNECTION
|
static int |
HEAD_COLLECTION_CONNECTION
|
static int |
NO_CONNECTION
Indicates that there is no information how the services are connected. |
static int |
NO_OUTPUT
|
static String |
NS_DIVIDER
A divider used in connectors to separate
namespace and data type name. |
static int |
SIMPLE_CONNECTION
|
static int |
TAIL_COLLECTION_CONNECTION
|
Constructor Summary | |
---|---|
ServicesEdge(MobyService sourceService,
int connectionType)
Constructs an instance with a source service and a connection type. |
|
ServicesEdge(MobyService sourceService,
MobyService targetService,
String connector)
Constructs an instance with both source and target services, and a connector. |
|
ServicesEdge(MobyService sourceService,
String connector)
Constructs an instance with a source service and a connector. |
Method Summary | |
---|---|
String |
extractNamespace()
|
int |
getConnectionType()
Retrieves connection type. |
String |
getConnector()
Retrieves connector. |
String |
getId()
|
MobyService |
getSourceService()
Retrieves the source service. |
MobyService |
getTargetService()
Retrieves the target service. |
boolean |
isWeakConnection()
Returns quality of this connection. |
void |
setConnectionType(int connectionType)
Sets connection type. |
void |
setConnector(String connector)
Sets connector. |
void |
setWeakConnection(boolean weak)
Sets quality of this connection. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_CONNECTION
public static final int SIMPLE_CONNECTION
public static final int HEAD_COLLECTION_CONNECTION
public static final int TAIL_COLLECTION_CONNECTION
public static final int BOTH_COLLECTIONS_CONNECTION
public static final int NO_OUTPUT
public static final String NS_DIVIDER
connectors
to separate
namespace and data type name.
Constructor Detail |
---|
public ServicesEdge(MobyService sourceService, int connectionType)
public ServicesEdge(MobyService sourceService, String connector)
public ServicesEdge(MobyService sourceService, MobyService targetService, String connector)
setConnectionType(int)
later.
Method Detail |
---|
public String getId()
public String toString()
toString
in class Object
public String extractNamespace()
public MobyService getSourceService()
public MobyService getTargetService()
public void setConnector(String connector)
connector
- is a string representing namespace and data
type linking together source and target servicespublic String getConnector()
setConnector(java.lang.String)
public void setConnectionType(int connectionType)
connectionType
- is a new connection type. It prints a
warning on the STDERR if the connection type is unknown.public int getConnectionType()
public void setWeakConnection(boolean weak)
weak
- value TRUE suggests to consider the connection weakisWeakConnection
public boolean isWeakConnection()
What is a "weak connection"? It indicates that one or both involved services have more than one input or output but the other service in the pair can provide less (usually just one) inputs or outputs. This may not be wrong (it depends on the service itself how can deal with missing inputs) but it is worth to mentioned it somewhere.
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |