|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.admin.hci.InstanceInfoImpl
public class InstanceInfoImpl
This class represents an instance information that includes the communication settings of a server instance of the connected SAP CC Core Server system; It contains the configuration of the different technical interfaces that are enabled.
InstanceId)
com.highdeal.hci)
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="instanceInfo">
<xs:complexType>
<xs:attribute name="instanceId" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="((dispatcher|updater|rater|guider|bulkLoader|taxer)#\d)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="hostname" type="xs:string" use="required"/>
<xs:attribute name="hciAddr" type="xs:string" />
<xs:attribute name="hciPort" type="xs:integer" />
<xs:attribute name="hciSecure" type="xs:integer" />
<xs:attribute name="wsAddr" type="xs:string" />
<xs:attribute name="wsPort" type="xs:integer" />
<xs:attribute name="wsSecure" type="xs:integer" />
<xs:attribute name="externalAddr" type="xs:string" />
<xs:attribute name="externalPort" type="xs:integer" />
<xs:attribute name="externalSecure" type="xs:integer" />
<xs:attribute name="internalAddr" type="xs:string" />
<xs:attribute name="internalPort" type="xs:integer" />
<xs:attribute name="internalSecure" type="xs:integer" />
</xs:complexType>
</xs:element>
| Field Summary |
|---|
| Fields inherited from interface com.highdeal.admin.hci.InstanceInfo |
|---|
TAG_NAME |
| Constructor Summary | |
|---|---|
InstanceInfoImpl()
Builds an empty InstanceInfo instance. |
|
InstanceInfoImpl(InstanceId instanceId,
java.lang.String hostname)
Initializes a new InstanceInfo instance with its parameters. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
int |
compareTo(InstanceInfo other)
Compares two instance info object according to their instance ID; It returns -1 if the instance is smaller than o2, 0 if they are equals, 1 otherwise. |
InstanceInfo |
duplicate()
Copies this InstanceInfo into a new instance of InstanceInfo. |
ServiceInfo.Address |
getAddress(ServiceInfo.ServiceInfoType serviceInfoType)
Gets the address defined for the service. |
java.lang.String |
getFullHost(ServiceInfo.ServiceInfoType serviceInfoType)
Gets the host name defined for the service with the multi-homing information. |
java.lang.String |
getHost(ServiceInfo.ServiceInfoType serviceInfoType)
Gets the host name defined for the service. |
java.lang.String |
getHostname()
Gets the instance host name. |
java.lang.String |
getHttpHost()
Deprecated. |
int |
getHttpPort()
Deprecated. |
java.lang.String |
getHTTPURL()
Deprecated. |
InstanceId |
getInstanceId()
Returns the value of the instance ID. |
java.lang.String |
getInstanceName(boolean full)
Returns the name (string representation of the InstanceId) or the full name ([<HTTP_HOST_NAME>]<INSTANCE_ID>) of the instance of the SAP CC system |
static java.lang.String |
getLocalInstanceNameFromInstanceId(InstanceId instanceId,
java.lang.String ipAddress,
boolean fullname)
Returns the name of the instance specified with its instance ID and running on the localhost. |
int |
getPort(ServiceInfo.ServiceInfoType serviceInfoType)
Gets the port defined for the service. |
ServiceInfo.ServiceInfoSecurity |
getSecurity(ServiceInfo.ServiceInfoType serviceInfoType)
Gets the security defined for the service. |
java.lang.String |
getSecurityAsString(ServiceInfo.ServiceInfoType serviceInfoType)
|
ServiceInfo |
getServiceInfo(ServiceInfo.ServiceInfoType type)
Returns the service information value, containing host value and port number. |
java.lang.String |
getURL(ServiceInfo.ServiceInfoType serviceType)
Returns the URL for the service. |
boolean |
hasSame(InstanceId instanceId)
|
boolean |
hasSame(InstanceType instanceType)
|
boolean |
isHttpMultipleBinding()
Deprecated. |
boolean |
isHTTPSecurityEnabled()
Deprecated. |
boolean |
isMultipleBinding(ServiceInfo.ServiceInfoType serviceInfoType)
Returns true if the service is bound to all available addresses. |
boolean |
isServiceAvailable(ServiceInfo.ServiceInfoType serviceType)
Returns true if the service is available. |
boolean |
isServiceEnabled(ServiceInfo.ServiceInfoType serviceType)
Returns true if the service is available and enabled. |
void |
isValid()
Throws an InvalidInstanceInfoException if the instance info is malformed or invalid. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
ServiceInfo |
putServiceInfo(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String host,
int port,
ServiceInfo.ServiceInfoSecurity security)
|
void |
putServiceInfo(ServiceInfo serviceInfo)
|
ServiceInfo |
removeServiceInfo(ServiceInfo.ServiceInfoType type)
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setFullHost(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String fullHost)
Sets the host name defined for the service with the multi-homing information. |
void |
setHost(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String host)
Sets the host name defined for the service. |
void |
setHostname(java.lang.String hostname)
|
void |
setHTTPSecurityEnable(boolean flag)
Deprecated. |
void |
setInstanceId(InstanceId instanceId)
|
void |
setInstanceName(java.lang.String instanceName)
|
void |
setPort(ServiceInfo.ServiceInfoType serviceInfoType,
int port)
Sets the port defined for the service. |
void |
setSecurity(ServiceInfo.ServiceInfoType serviceInfoType,
ServiceInfo.ServiceInfoSecurity security)
Sets the security policy defined for the service. |
java.lang.String |
toString()
Returns a printable form of the instance map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InstanceInfoImpl()
InstanceInfo instance.
public InstanceInfoImpl(InstanceId instanceId,
java.lang.String hostname)
InstanceInfo instance with its parameters.
instanceId - The instance IDhostname - The instance host name| Method Detail |
|---|
public InstanceInfo duplicate()
InstanceInfo
duplicate in interface InstanceInfo
public ServiceInfo putServiceInfo(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String host,
int port,
ServiceInfo.ServiceInfoSecurity security)
public void putServiceInfo(ServiceInfo serviceInfo)
public ServiceInfo getServiceInfo(ServiceInfo.ServiceInfoType type)
InstanceInfo
getServiceInfo in interface InstanceInfotype - The service type, which is one among service info list
public ServiceInfo removeServiceInfo(ServiceInfo.ServiceInfoType type)
public boolean hasSame(InstanceType instanceType)
public boolean hasSame(InstanceId instanceId)
public boolean isServiceEnabled(ServiceInfo.ServiceInfoType serviceType)
InstanceInfotrue if the service is available and enabled.
isServiceEnabled in interface InstanceInfoserviceType - The service value among service info list
true if the service is enabled, false otherwisepublic boolean isServiceAvailable(ServiceInfo.ServiceInfoType serviceType)
InstanceInfotrue if the service is available.
isServiceAvailable in interface InstanceInfoserviceType - A service value among service info list
true if the service is available, false otherwise@Deprecated public java.lang.String getHttpHost()
@Deprecated public int getHttpPort()
public int compareTo(InstanceInfo other)
-1 if the instance is smaller than o2, 0 if they are equals, 1 otherwise.
compareTo in interface java.lang.Comparable<InstanceInfo>public InstanceId getInstanceId()
InstanceInfo
getInstanceId in interface InstanceInfoInstanceId instance ID) of the instance in the SAP CC systempublic ServiceInfo.Address getAddress(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfo
getAddress in interface InstanceInfoserviceInfoType - value among service info list
public java.lang.String getFullHost(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfo
getFullHost in interface InstanceInfoserviceInfoType - A value among service info list
public java.lang.String getHost(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfo
getHost in interface InstanceInfoserviceInfoType - A value among service info list
public int getPort(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfo
getPort in interface InstanceInfoserviceInfoType - A value among service info list
public ServiceInfo.ServiceInfoSecurity getSecurity(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfo
getSecurity in interface InstanceInfoserviceInfoType - A value among service info list
security
public void setFullHost(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String fullHost)
InstanceInfo
setFullHost in interface InstanceInfoserviceInfoType - A value among service info listfullHost - The new service host name
public void setHost(ServiceInfo.ServiceInfoType serviceInfoType,
java.lang.String host)
InstanceInfo
setHost in interface InstanceInfoserviceInfoType - A value among service info listhost - The new service host name
public void setPort(ServiceInfo.ServiceInfoType serviceInfoType,
int port)
InstanceInfo
setPort in interface InstanceInfoserviceInfoType - A value among service info listport - The new service port
public void setSecurity(ServiceInfo.ServiceInfoType serviceInfoType,
ServiceInfo.ServiceInfoSecurity security)
InstanceInfo
setSecurity in interface InstanceInfoserviceInfoType - A value among service info listsecurity - The new security@Deprecated public boolean isHTTPSecurityEnabled()
InstanceInfotrue if the HTTP service security is enabled.
isHTTPSecurityEnabled in interface InstanceInfotrue indicates that HTTP service is secured; this is the default@Deprecated public void setHTTPSecurityEnable(boolean flag)
InstanceInfo
setHTTPSecurityEnable in interface InstanceInfoflag - true if the HTTP service security is enabled@Deprecated public java.lang.String getHTTPURL()
InstanceInfo
getHTTPURL in interface InstanceInfopublic java.lang.String getURL(ServiceInfo.ServiceInfoType serviceType)
InstanceInfo
getURL in interface InstanceInfoserviceType - A service value among service info list
public java.lang.String getInstanceName(boolean full)
InstanceInfoInstanceId) or the full name ([<HTTP_HOST_NAME>]<INSTANCE_ID>) of the instance of the SAP CC system
InstanceId
getInstanceName in interface InstanceInfofull - true to return the full name, false to return the string representation of the instance identifier
public java.lang.String getHostname()
InstanceInfo
getHostname in interface InstanceInfopublic void setInstanceId(InstanceId instanceId)
public void setHostname(java.lang.String hostname)
public void setInstanceName(java.lang.String instanceName)
@Deprecated public boolean isHttpMultipleBinding()
InstanceInfo
isHttpMultipleBinding in interface InstanceInfotrue if the HTTP server is bound to all available addresses, false otherwisepublic boolean isMultipleBinding(ServiceInfo.ServiceInfoType serviceInfoType)
InstanceInfotrue if the service is bound to all available addresses.
isMultipleBinding in interface InstanceInfoserviceInfoType - A serviceType service value among service info list
true if the service is bound to all available addresses, false otherwise
public void isValid()
throws InvalidInstanceException
InstanceInfo
isValid in interface InstanceInfoInvalidInstanceException - If the instance map is not validpublic java.lang.String getSecurityAsString(ServiceInfo.ServiceInfoType serviceInfoType)
public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic java.lang.String toString()
toString in class java.lang.Objectinstance map
public static final java.lang.String getLocalInstanceNameFromInstanceId(InstanceId instanceId,
java.lang.String ipAddress,
boolean fullname)
instanceId - The identifier of the instance to be namedipAddress - The IP address of the instancefullname - true if the full name is expected, false if only the name is expected.
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||