|
SAP CC 3.0 BART API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.bart.message.CDRServiceClient
public class CDRServiceClient
This class allows a user to send some CDRs to SAP Convergent Charging BART Server
by using an efficient message protocol based on TCP/IP.
| Constructor Summary | |
|---|---|
CDRServiceClient()
Creates a non-initialized message client. |
|
CDRServiceClient(java.lang.String hostName,
int port)
Creates a message client and connect it with the CDR Service server. |
|
CDRServiceClient(java.lang.String hostName,
int port,
int timeout)
Creates a message client and connect it with the CDR Service server. |
|
CDRServiceClient(java.lang.String hostName,
int port,
java.lang.String bindAddress,
int timeout)
Initializes a message client and connect it with the CDR service server. |
|
| Method Summary | |
|---|---|
AcquireCDRResult |
acquireCDR(java.util.Vector<CDRModel> cdrs,
AcquisitionSessionModel session)
Asks the server to acquire the specified cdrs . |
void |
close()
Closes the connection with the CDR Service server. |
void |
connect(java.lang.String hostName,
int port)
Connect this cdr service client using the round robin with the server. |
void |
connect(java.lang.String hostName,
int port,
int timeout)
Connect this cdr service client using the round robin with the server. |
void |
connect(java.lang.String hostName,
int port,
java.lang.String bindAddress,
int timeout)
Connect this cdr service client using the round robin with the server. |
void |
connect(java.lang.String hostname,
int port,
java.lang.String bindAddress,
int timeout,
ServiceClientTuning config)
Connects this cdr service client to the remote cdr service server of BART. |
int |
getTimeout()
Returns the timeout in milliseconds for each request (or -1 to wait indefinitely) |
boolean |
isConnected()
Gets the connected status. |
AcquisitionSessionModel |
startAcquisitionSession(AcquisitionSessionModel session)
Starts an acquisition session. |
AcquisitionSessionModel |
stopAcquisitionSession(AcquisitionSessionModel session,
boolean withErrors)
Stops an acquisition session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CDRServiceClient()
One of the methods connect() must then be used to connect it to a CDRs
Service server.
public CDRServiceClient(java.lang.String hostName,
int port)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.
java.io.IOException - if the client cannot connect to the server (if server is not running, for instance).
public CDRServiceClient(java.lang.String hostName,
int port,
int timeout)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.timeout - the timeout in milliseconds for each request (or -1 to wait indefinitely).
If you use zero and acknowledgments are requested then a CommunicationFailureException will be thrown without sending request.
java.io.IOException - if the client cannot connect to the server (if server is not running, for instance).
public CDRServiceClient(java.lang.String hostName,
int port,
java.lang.String bindAddress,
int timeout)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.bindAddress - the address to bind to, can be nulltimeout - the timeout in milliseconds for each request (or -1 to wait indefinitely).
If you use zero and acknowledgments are requested then a CommunicationFailureException will be thrown without sending request.
java.io.IOException - if the client cannot connect to the servers.| Method Detail |
|---|
public int getTimeout()
public AcquireCDRResult acquireCDR(java.util.Vector<CDRModel> cdrs,
AcquisitionSessionModel session)
throws InvalidCDRException,
InvalidAcquisitionException,
ServerFailureException,
CommunicationFailureException
cdrs - a vector of CDRs to acquire.session - the acquisition session which these CDRs will be linked to
InvalidCDRException - if the cdr is not valid
InvalidAcquisitionException - if the acquisition session is
not valid
ServerFailureException - if the server is not available
CommunicationFailureException - if a communication failure
occurs
public AcquisitionSessionModel startAcquisitionSession(AcquisitionSessionModel session)
throws InvalidAcquisitionException,
ServerFailureException,
CommunicationFailureException
session - the acquisition session to start
InvalidAcquisitionException - if the acquisition session is
not valid
ServerFailureException - if the server is not available
CommunicationFailureException - if a communication failure
occurs
public AcquisitionSessionModel stopAcquisitionSession(AcquisitionSessionModel session,
boolean withErrors)
throws InvalidAcquisitionException,
ServerFailureException,
CommunicationFailureException
session - the acquisition session to stopwithErrors - in case client want to notify BART server that some
errors occurred during acquisition
InvalidAcquisitionException - if the acquisition session is
not valid
ServerFailureException - if the server is not available
CommunicationFailureException - if a communication failure
occurs
public void connect(java.lang.String hostName,
int port,
int timeout)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.timeout - the timeout for the client's requests.
java.io.IOException - if the client cannot connect to the server (if server is not running, for instance).
public void connect(java.lang.String hostName,
int port)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.
java.io.IOException - if the client cannot connect to the server (if server is not running, for instance).
public void connect(java.lang.String hostName,
int port,
java.lang.String bindAddress,
int timeout)
throws java.io.IOException
hostName - the host name of the server.port - the port on which the server waits for request.bindAddress - the address to bind description.timeout - the timeout for the clients request.
java.io.IOException - if the client cannot connect to the server (if server is not running, for instance).
public void connect(java.lang.String hostname,
int port,
java.lang.String bindAddress,
int timeout,
ServiceClientTuning config)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException,
java.io.IOException
The cdr service server is identified by its hostname on which it is running and its listening port. Please see BART documentation in order to find the value of this properties.
This client can be bound to one or all the network interface(s) of the running host.
If you want to force this client to be bound to one specific network interface, just specified the argument bindAddress
with a valid ip address or a valid hostname. Otherwise this client will be bound to all the network interfaces.
Whatever the bind address, the port of this client will be choosen automatically between all the available ports of the network interface(s).
After having invoked this method, this client will maintain the connection with the server opened. If the connection is closed because of
network problem, this client will try to open again the connection with the server every 2 seconds. This period can be updated using the
ServiceClientTuning.
hostname - the ip address or the name of the host on which the cdr service server is running. Mustn't be null.port - the port on which the cdr service server is listening. It is a positive integer up to 65535.bindAddress - the local address (ip address or host name) to which this client has to be bound. If not specified (i.e. is null), this client will be
bound to all the available addresses. The bound port will be the choosen between all the available port.timeout - the maximal duration in second, the response of a message has to be expected whatever the sent message.
If no timeout is needed, set timeout to NO_TIMEOUT.config - sensitive parameter set useful in order to tune the high availability (HA) of this service.
Should be null or may be specified only in order to resolve HA issue. If null,
the default values of ServiceClientTuning are used.
java.lang.IllegalStateException - if this client is already connected with a remote cdr service server.
java.lang.IllegalArgumentException - if hostname is null or if port is outside the range of a valid port values.
java.io.IOException - if this client cannot be connected to the server because of an I/O error.public boolean isConnected()
public void close()
|
SAP CC 3.0 BART API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||