/**
* This file was auto-generated by mofcomp -j version 1.0.0 on Wed Jan 12
* 09:21:06 CET 2011.
*/
package org.opennaas.extensions.router.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This Class contains accessor and mutator methods for all properties defined in the CIM class ProtocolEndpoint as well as methods comparable to the
* invokeMethods defined for this class. This Class implements the ProtocolEndpointBean Interface. The CIM class ProtocolEndpoint is described as
* follows:
*
* A communication point from which data can be sent or received. ProtocolEndpoints link system or computer interfaces to LogicalNetworks.
*/
@XmlSeeAlso({
VLANEndpoint.class,
IPProtocolEndpoint.class
})
public class ProtocolEndpoint extends ServiceAccessPoint implements
Serializable {
/**
*
*/
private static final long serialVersionUID = 4635898523052855454L;
/**
* Sets the ProvidesEndpoint association between a given Service and this element.
*
* @param protocolEndpoint
*/
public void setService(Service service) {
if (service != null)
ProvidesEndpoint.link(service, this);
}
/**
* Removes the ProvidesEndpoint association between the given ProtocolEndpoint and this element.
*
* @param protocolEndpoint
*/
public void unsetService(Service service) {
if (service != null) {
Association a = this.getFirstFromAssociationByTypeAndElement(ProvidesEndpoint.class, service);
if (a != null)
a.unlink();
}
}
/**
* Returns the Service associated to this element.
*
* @return
*/
public Service getService() {
return (Service) this.getFirstFromAssociatedElementByType(ProvidesEndpoint.class);
}
/* BindsTo */
/**
*
* @return list of ServiceAccessPoint associated with this ProtocolEndpoint through BindsTo dependency as dependent.
*/
@SuppressWarnings("unchecked")
public List<ServiceAccessPoint> getBindedServiceAccessPoints() {
return (List<ServiceAccessPoint>) this.getToAssociatedElementsByType(BindsTo.class);
}
/**
* Binds sap to this ProtocolEndpoint using BindsTo dependency. This Protocol endpoint is the antecedent, and sap is de dependent.
*
* @param sap
* @return true if association has been created, false otherwise.
*/
public boolean bindServiceAccessPoint(ServiceAccessPoint sap) {
if (sap == null)
return false;
BindsTo.link(this, sap);
return true;
}
/**
* Removes BindsTo association between this ProtocolEndpoint and sap, where this is the antecedent and sap the dependent, if any.
*
* @param sap
* @return true if association has been removed, false otherwise (also if there was no such association).
*/
public boolean unbindServiceAccessPoint(ServiceAccessPoint sap) {
if (sap == null)
return false;
Association a = this.getFirstToAssociationByTypeAndElement(BindsTo.class, sap);
if (a == null)
return false;
a.unlink();
return true;
}
// //Example when ProtocolEndpoint makes as FROM
/**
*
* @param nextHop
* @return
*/
public boolean addNextHopRoute(NextHopRoute nextHop) {
if (nextHop == null)
return false;
return (RouteUsesEndpoint.link(this, nextHop) != null);
}
/**
*
* @param nextHop
* @return
*/
public boolean removeNextHopRoute(NextHopRoute nextHop) {
if (nextHop == null)
return false;
Association a = this.getToAssociationByElement(nextHop);
if (a == null)
return false;
else {
a.unlink();
return true;
}
}
/**
* This method returns the list of NextHopRoute from the toAssociation vector that match with the type RouteUsesEndpoint
*
* @return List<NextHopRoute>
*/
@SuppressWarnings("unchecked")
public List<NextHopRoute> getNextHopRoutes() {
return (List<NextHopRoute>) this.getToAssociatedElementsByType(RouteUsesEndpoint.class);
}
// //Example when ProtocolEndpoint makes as TO
/**
* Add a new PortImplementsEndpoint association between logiaclPort and this element
*
* @param logicalPort
* @return
*/
public boolean addLogiaclPort(LogicalPort logicalPort) {
if (logicalPort == null)
return false;
return (PortImplementsEndpoint.link(logicalPort, this) != null);
}
/**
* Remove the PortImplementsEndpoint association (will be deleted) between the logiaclPort and this element
*
* @param logicalPort
* @return
*/
public boolean removeLogicalPort(LogicalPort logicalPort) {
if (logicalPort == null)
return false;
Association a = this.getFromAssociationByElement(logicalPort);
if (a == null)
return false;
else {
a.unlink();
return true;
}
}
/**
* This method returns the list of LogicalPort from the fromAssociation vector that match with the type PortImplementsEndpoint the association
* wouldn't be deleted
*
* @return List<LogicalPort>
*/
@SuppressWarnings("unchecked")
public List<LogicalPort> getLogicalPorts() {
return (List<LogicalPort>) this.getFromAssociatedElementsByType(PortImplementsEndpoint.class);
}
/**
* This constructor creates a ProtocolEndpointBeanImpl Class which implements the ProtocolEndpointBean Interface, and encapsulates the CIM class
* ProtocolEndpoint in a Java Bean. The CIM class ProtocolEndpoint is described as follows:
*
* A communication point from which data can be sent or received. ProtocolEndpoints link system or computer interfaces to LogicalNetworks.
*/
public ProtocolEndpoint() {
};
/**
* The following constants are defined for use with the ValueMap/Values qualified property description.
*/
private String description;
/**
* This method returns the ProtocolEndpoint.description property value. This property is described as follows:
*
* The Description property provides a textual description of the object.
*
* @return String current description property value
* @exception Exception
*/
@Override
public String getDescription() {
return this.description;
} // getDescription
/**
* This method sets the ProtocolEndpoint.description property value. This property is described as follows:
*
* The Description property provides a textual description of the object.
*
* @param String
* new description property value
* @exception Exception
*/
@Override
public void setDescription(String description) {
this.description = description;
} // setDescription
/**
* The following constants are defined for use with the ValueMap/Values qualified property timeOfLastStateChange.
*/
private Date timeOfLastStateChange;
/**
* This method returns the ProtocolEndpoint.timeOfLastStateChange property value. This property is described as follows:
*
* The date or time when the EnabledState of the element last changed. If the state of the element has not changed and this property is populated,
* then it must be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property must not be
* updated.
*
* @return Date current timeOfLastStateChange property value
* @exception Exception
*/
@Override
public Date getTimeOfLastStateChange() {
return this.timeOfLastStateChange;
} // getTimeOfLastStateChange
/**
* This method sets the ProtocolEndpoint.timeOfLastStateChange property value. This property is described as follows:
*
* The date or time when the EnabledState of the element last changed. If the state of the element has not changed and this property is populated,
* then it must be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property must not be
* updated.
*
* @param Date
* new timeOfLastStateChange property value
* @exception Exception
*/
@Override
public void setTimeOfLastStateChange(Date timeOfLastStateChange) {
this.timeOfLastStateChange = timeOfLastStateChange;
} // setTimeOfLastStateChange
/**
* This method returns the ProtocolEndpoint.name property value. This property is described as follows:
*
* A string that identifies this ProtocolEndpoint with either a port or an interface on a device. To ensure uniqueness, the Name property should
* be prepended or appended with information from the Type or OtherTypeDescription properties. The method selected is described in the NameFormat
* property of this class.
*
* @return String current name property value
* @exception Exception
*/
@Override
public String getName() {
return super.getName();
} // getName
/**
* This method sets the ProtocolEndpoint.name property value. This property is described as follows:
*
* A string that identifies this ProtocolEndpoint with either a port or an interface on a device. To ensure uniqueness, the Name property should
* be prepended or appended with information from the Type or OtherTypeDescription properties. The method selected is described in the NameFormat
* property of this class.
*
* @param String
* new name property value
* @exception Exception
*/
@Override
public void setName(String name) {
super.setName(name);
} // setName
/**
* The following constants are defined for use with the ValueMap/Values qualified property nameFormat.
*/
private String nameFormat;
/**
* This method returns the ProtocolEndpoint.nameFormat property value. This property is described as follows:
*
* NameFormat contains the naming heuristic that is selected to ensure that the value of the Name property is unique. For example, you might
* choose to prepend the name of the port or interface with the Type of ProtocolEndpoint (for example, IPv4) of this instance followed by an
* underscore.
*
* @return String current nameFormat property value
* @exception Exception
*/
public String getNameFormat() {
return this.nameFormat;
} // getNameFormat
/**
* This method sets the ProtocolEndpoint.nameFormat property value. This property is described as follows:
*
* NameFormat contains the naming heuristic that is selected to ensure that the value of the Name property is unique. For example, you might
* choose to prepend the name of the port or interface with the Type of ProtocolEndpoint (for example, IPv4) of this instance followed by an
* underscore.
*
* @param String
* new nameFormat property value
* @exception Exception
*/
public void setNameFormat(String nameFormat) {
this.nameFormat = nameFormat;
} // setNameFormat
/**
* The following constants are defined for use with the ValueMap/Values qualified property ProtocolType.
*/
@Deprecated
public enum ProtocolType {
UNKNOWN,
OTHER,
IPV4,
IPV6,
IPX,
APPLETALK,
DECNET,
SNA,
CONP,
CLNP,
VINES,
XNS,
ATM,
FRAME_RELAY,
ETHERNET,
TOKENRING,
FDDI,
INFINIBAND,
FIBRE_CHANNEL,
ISDN_BRI_ENDPOINT,
ISDN_B_CHANNEL_ENDPOINT,
ISDN_D_CHANNEL_ENDPOINT,
IPV4_V6,
BGP,
OSPF,
MPLS,
UDP,
TCP
}
@Deprecated
private ProtocolType protocolType;
/**
* This method returns the ProtocolEndpoint.protocolType property value. This property is described as follows:
*
* Note: This property is deprecated in lieu of the ProtocolIFType enumeration. This deprecation was done to have better alignment between the
* IF-MIB of the IETF and this CIM class. Deprecated description: ProtocolType is an enumeration that provides information to categorize and
* classify different instances of this class. For most instances, information in this enumeration and the definition of the subclass overlap.
* However, there are several cases where a specific subclass of ProtocolEndpoint is not required (for example, there is no Fibre Channel subclass
* of ProtocolEndpoint). Therefore, this property is needed to define the type of Endpoint.
*
* @return int current protocolType property value
* @exception Exception
*/
@Deprecated
public ProtocolType getProtocolType() {
return this.protocolType;
} // getProtocolType
/**
* This method sets the ProtocolEndpoint.protocolType property value. This property is described as follows:
*
* Note: This property is deprecated in lieu of the ProtocolIFType enumeration. This deprecation was done to have better alignment between the
* IF-MIB of the IETF and this CIM class. Deprecated description: ProtocolType is an enumeration that provides information to categorize and
* classify different instances of this class. For most instances, information in this enumeration and the definition of the subclass overlap.
* However, there are several cases where a specific subclass of ProtocolEndpoint is not required (for example, there is no Fibre Channel subclass
* of ProtocolEndpoint). Therefore, this property is needed to define the type of Endpoint.
*
* @param int new protocolType property value
* @exception Exception
*/
@Deprecated
public void setProtocolType(ProtocolType protocolType) {
this.protocolType = protocolType;
} // setProtocolType
/**
* The following constants are defined for use with the ValueMap/Values qualified property ProtocolIFType.
*/
public enum ProtocolIFType {
UNKNOWN,
OTHER,
REGULAR_1822,
HDH_1822,
DDN_X_25,
RFC877_X_25,
ETHERNET_CSMA_CD,
ISO_802_3_CSMA_CD,
ISO_802_4_TOKEN_BUS,
ISO_802_5_TOKEN_RING,
ISO_802_6_MAN,
STARLAN,
PROTEON_10MBIT,
PROTEON_80MBIT,
HYPERCHANNEL,
FDDI,
LAP_B,
SDLC,
DS1,
E1,
BASIC_ISDN,
PRIMARY_ISDN,
PROPRIETARY_POINT_TO_POINT_SERIAL,
PPP,
SOFTWARE_LOOPBACK,
EON,
ETHERNET_3MBIT,
NSIP,
SLIP,
ULTRA,
DS3,
SIP,
FRAME_RELAY,
RS_232,
PARALLEL,
ARCNET,
ARCNET_PLUS,
ATM,
MIO_X_25,
SONET,
X_25_PLE,
ISO_802_211C,
LOCALTALK,
SMDS_DXI,
FRAME_RELAY_SERVICE,
V_35,
HSSI,
HIPPI,
MODEM,
AAL5,
SONET_PATH,
SONET_VT,
SMDS_ICIP,
PROPRIETARY_VIRTUAL_INTERNAL,
PROPRIETARY_MULTIPLEXOR,
IEEE_802_12,
FIBRE_CHANNEL,
HIPPI_INTERFACE,
FRAME_RELAY_INTERCONNECT,
ATM_EMULATED_LAN_FOR_802_3,
ATM_EMULATED_LAN_FOR_802_5,
ATM_EMULATED_CIRCUIT,
FAST_ETHERNET_100BASET,
ISDN,
V_11,
V_36,
G703_AT_64K,
G703_AT_2MB,
QLLC,
FAST_ETHERNET_100BASEFX,
CHANNEL,
IEEE_802_11,
IBM_260_370_OEMI_CHANNEL,
ESCON,
DATA_LINK_SWITCHING,
ISDN_S_T_INTERFACE,
ISDN_U_INTERFACE,
LAP_D,
IP_SWITCH,
REMOTE_SOURCE_ROUTE_BRIDGING,
ATM_LOGICAL,
DS0,
DS0_BUNDLE,
BSC,
ASYNC,
COMBAT_NET_RADIO,
ISO_802_5R_DTR,
EXT_POS_LOC_REPORT_SYSTEM,
APPLETALK_REMOTE_ACCESS_PROTOCOL,
PROPRIETARY_CONNECTIONLESS,
ITU_X_29_HOST_PAD,
ITU_X_3_TERMINAL_PAD,
FRAME_RELAY_MPI,
ITU_X_213,
ADSL,
RADSL,
SDSL,
VDSL,
ISO_802_5_CRFP,
MYRINET,
VOICE_RECEIVE_AND_TRANSMIT,
VOICE_FOREIGN_EXCHANGE_OFFICE,
VOICE_FOREIGN_EXCHANGE_SERVICE,
VOICE_ENCAPSULATION,
VOICE_OVER_IP,
ATM_DXI,
ATM_FUNI,
ATM_IMA,
PPP_MULTILINK_BUNDLE,
IP_OVER_CDLC,
IP_OVER_CLAW,
STACK_TO_STACK,
VIRTUAL_IP_ADDRESS,
MPC,
IP_OVER_ATM,
ISO_802_5J_FIBRE_TOKEN_RING,
TDLC,
GIGABIT_ETHERNET,
HDLC,
LAP_F,
V_37,
X_25_MLP,
X_25_HUNT_GROUP,
TRANSP_HDLC,
INTERLEAVE_CHANNEL,
FAST_CHANNEL,
IP_FOR_APPN_HPR_IN_IP_NETWORKS,
CATV_MAC_LAYER,
CATV_DOWNSTREAM,
CATV_UPSTREAM,
AVALON_12MPP_SWITCH,
TUNNEL,
COFFEE,
CIRCUIT_EMULATION_SERVICE,
ATM_SUBINTERFACE,
LAYER_2_VLAN_USING_802_1Q,
LAYER_3_VLAN_USING_IP,
LAYER_3_VLAN_USING_IPX,
DIGITAL_POWER_LINE,
MULTIMEDIA_MAIL_OVER_IP,
DTM,
DCN,
IP_FORWARDING,
MSDSL,
IEEE_1394,
IF_GSN_HIPPI_6400,
DVB_RCC_MAC_LAYER,
DVB_RCC_DOWNSTREAM,
DVB_RCC_UPSTREAM,
ATM_VIRTUAL,
MPLS_TUNNEL,
SRP,
VOICE_OVER_ATM,
VOICE_OVER_FRAME_RELAY,
ISDL,
COMPOSITE_LINK,
SS7_SIGNALING_LINK,
PROPRIETARY_P2P_WIRELESS,
FRAME_FORWARD,
RFC1483_MULTIPROTOCOL_OVER_ATM,
USB,
IEEE_802_3AD_LINK_AGGREGATE,
BGP_POLICY_ACCOUNTING,
FRF_16_MULTILINK_FR,
H_323_GATEKEEPER,
H_323_PROXY,
MPLS,
MULTI_FREQUENCY_SIGNALING_LINK,
HDSL_2,
S_HDSL,
DS1_FACILITY_DATA_LINK,
PACKET_OVER_SONET_SDH,
DVB_ASI_INPUT,
DVB_ASI_OUTPUT,
POWER_LINE,
NON_FACILITY_ASSOCIATED_SIGNALING,
TR008,
GR303_RDT,
GR303_IDT,
ISUP,
PROPRIETARY_WIRELESS_MAC_LAYER,
PROPRIETARY_WIRELESS_DOWNSTREAM,
PROPRIETARY_WIRELESS_UPSTREAM,
HIPERLAN_TYPE_2,
PROPRIETARY_BROADBAND_WIRELESS_ACCESS_POINT_TO_MULIPOINT,
SONET_OVERHEAD_CHANNEL,
DIGITAL_WRAPPER_OVERHEAD_CHANNEL,
ATM_ADAPTATION_LAYER_2,
RADIO_MAC,
ATM_RADIO,
INTER_MACHINE_TRUNK,
MVL_DSL,
LONG_READ_DSL,
FRAME_RELAY_DLCI_ENDPOINT,
ATM_VCI_ENDPOINT,
OPTICAL_CHANNEL,
OPTICAL_TRANSPORT,
PROPRIETARY_ATM,
VOICE_OVER_CABLE,
INFINIBAND,
TE_LINK,
Q_2931,
VIRTUAL_TRUNK_GROUP,
SIP_TRUNK_GROUP,
SIP_SIGNALING,
CATV_UPSTREAM_CHANNEL,
ECONET,
FSAN_155MB_PON,
FSAN_622MB_PON,
TRANSPARENT_BRIDGE,
LINE_GROUP,
VOICE_E_M_FEATURE_GROUP,
VOICE_FGD_EANA,
VOICE_DID,
MPEG_TRANSPORT,
_6TO4,
GTP,
PARADYNE_ETHERLOOP_1,
PARADYNE_ETHERLOOP_2,
OPTICAL_CHANNEL_GROUP,
HOMEPNA,
GFP,
CISCOISLVLAN,
ACTELISMETALOOP,
FCIP,
IANA_RESERVED,
IPV4,
IPV6,
IPV4_V6,
IPX,
DECNET,
SNA,
CONP,
CLNP,
VINES,
XNS,
ISDN_B_CHANNEL_ENDPOINT,
ISDN_D_CHANNEL_ENDPOINT,
BGP,
OSPF,
UDP,
TCP,
_802_11A,
_802_11B,
_802_11G,
_802_11H,
NFS,
CIFS,
DAFS,
WEBDAV,
HTTP,
FTP,
NDMP,
TELNET,
SSH,
SM_CLP,
SMTP,
LDAP,
RDP,
HTTPS,
DMTF_RESERVED,
VENDOR_RESERVED
}
private ProtocolIFType protocolIFType;
/**
* This method returns the ProtocolEndpoint.protocolIFType property value. This property is described as follows:
*
* ProtocolIFType is an enumeration that is synchronized with the IANA ifType MIB. The ifType MIB is maintained at the URL,
* http://www.iana.org/assignments/ianaiftype-mib. Also, additional values defined by the DMTF are included. The property is used to categorize
* and classify instances of the ProtocolEndpoint class. Note that if the ProtocolIFType is set to 1 (Other), then the type information should be
* provided in the OtherTypeDescription string property.
*
* @return int current protocolIFType property value
* @exception Exception
*/
public ProtocolIFType getProtocolIFType() {
return this.protocolIFType;
} // getProtocolIFType
/**
* This method sets the ProtocolEndpoint.protocolIFType property value. This property is described as follows:
*
* ProtocolIFType is an enumeration that is synchronized with the IANA ifType MIB. The ifType MIB is maintained at the URL,
* http://www.iana.org/assignments/ianaiftype-mib. Also, additional values defined by the DMTF are included. The property is used to categorize
* and classify instances of the ProtocolEndpoint class. Note that if the ProtocolIFType is set to 1 (Other), then the type information should be
* provided in the OtherTypeDescription string property.
*
* @param int new protocolIFType property value
* @exception Exception
*/
public void setProtocolIFType(ProtocolIFType protocolIFType) {
this.protocolIFType = protocolIFType;
} // setProtocolIFType
/**
* The following constants are defined for use with the ValueMap/Values qualified property otherTypeDescription.
*/
private String otherTypeDescription;
/**
* This method returns the ProtocolEndpoint.otherTypeDescription property value. This property is described as follows:
*
* A string that describes the type of ProtocolEndpoint when the Type property of this class (or any of its subclasses) is set to 1 (Other). This
* property should be set to null when the Type property is any value other than 1.
*
* @return String current otherTypeDescription property value
* @exception Exception
*/
public String getOtherTypeDescription() {
return this.otherTypeDescription;
} // getOtherTypeDescription
/**
* This method sets the ProtocolEndpoint.otherTypeDescription property value. This property is described as follows:
*
* A string that describes the type of ProtocolEndpoint when the Type property of this class (or any of its subclasses) is set to 1 (Other). This
* property should be set to null when the Type property is any value other than 1.
*
* @param String
* new otherTypeDescription property value
* @exception Exception
*/
public void setOtherTypeDescription(String otherTypeDescription) {
this.otherTypeDescription = otherTypeDescription;
} // setOtherTypeDescription
} // Class ProtocolEndpoint