Package cz.metacentrum.perun.core.api
Class Destination
java.lang.Object
cz.metacentrum.perun.core.api.PerunBean
cz.metacentrum.perun.core.api.Auditable
cz.metacentrum.perun.core.api.Destination
- All Implemented Interfaces:
Serializable
,Comparable<PerunBean>
- Direct Known Subclasses:
RichDestination
Destination where services are propagated.
- Author:
- Slavek Licehammer
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDestination
(int id, String destination) Destination
(int id, String destination, String type) Destination
(int id, String destination, String type, String propagationType) Destination
(int id, String destination, String type, String createdAt, String createdBy, String modifiedAt, String modifiedBy, Integer createdByUid, Integer modifiedByUid) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Gets the destination for this instance.Gets the hostname from destination e.g.Gets the propagation type for this instance.getType()
Gets the type for this instance.int
hashCode()
void
setDestination
(String destination) Sets the destination for this instance.void
setPropagationType
(String type) Sets the propagation type for this instance.void
Sets the type for this instance.toString()
Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUid
Methods inherited from class cz.metacentrum.perun.core.api.PerunBean
getBeanName, getId, setId
-
Field Details
-
DESTINATIONHOSTTYPE
- See Also:
-
DESTINATIONEMAILTYPE
- See Also:
-
DESTINATIONSEMAILTYPE
- See Also:
-
DESTINATIONURLTYPE
- See Also:
-
DESTINATIONUSERHOSTTYPE
- See Also:
-
DESTINATIONUSERHOSTPORTTYPE
- See Also:
-
DESTINATIONSERVICESPECIFICTYPE
- See Also:
-
DESTINATIONWINDOWS
- See Also:
-
DESTINATIONWINDOWSPROXY
- See Also:
-
PROPAGATIONTYPE_PARALLEL
- See Also:
-
PROPAGATIONTYPE_SERIAL
- See Also:
-
PROPAGATIONTYPE_DUMMY
- See Also:
-
-
Constructor Details
-
Destination
public Destination() -
Destination
-
Destination
-
Destination
-
Destination
-
-
Method Details
-
getDestination
Gets the destination for this instance.- Returns:
- The name.
-
setDestination
Sets the destination for this instance.- Parameters:
destination
- The destination.
-
getType
Gets the type for this instance.- Returns:
- The type.
-
getPropagationType
Gets the propagation type for this instance.- Returns:
- The propagation type, either "PARALLEL", "SERIAL" or "DUMMY"
-
getHostNameFromDestination
Gets the hostname from destination e.g. if destination is type user@host then return host e.g. if destination is type user@host:port then return host e.g. if destination is type user@host-windows then return host-windows if destination is other type then these three, return destination without changes if there is no chars @ and :, return not changed type if type is null, return this destination without changes if destination null, return destination without changes (null)- Returns:
- host from destination if possible to separate, in other case return destination without changes
-
setType
Sets the type for this instance.- Parameters:
type
- The type.
-
setPropagationType
Sets the propagation type for this instance.- Parameters:
type
- The propagation type.
-
serializeToString
- Overrides:
serializeToString
in classAuditable
-
toString
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PerunBean>
- Overrides:
compareTo
in classPerunBean
-