|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ohf.ihe.atna.audit.syslog.bsd.BSDClient
public class BSDClient
Class allowing to send a BSD message to a BSD server
example of use
BSDClient client = new BSDClient("127.0.0.1:515");
AuditMessage auditMessage ;
try
{
Prototype :
new QueryMessage(
int eventOutcomeIndicator ,
The eventOutcomeIndicator should be :
0 : Success
4 : Minor failure
8 : Serious failure
12: Major failure; action made unavailable
String userIDActiveParticipantConsumer ,
String userIDActiveParticipantRegistry ,
String auditSourceId ,
String participantObjectId ,
String participantObjectQuery
)
auditMessage = new QueryMessage( 0 , "Inpriva", "Registry", "localhost", "the patient", "select eo.id FROM...");
BSDMessage bsdMessage = new BSDMessage(InetAddress.getByName("lswin10.dfw.ibm.com"),
"H_Simpson", auditMessage.toXml());
  Prototype : BSDMessage( InetAddress toIP , String tag , String message )
client.sendMessage(bsdMessage);
}
catch (Exception e)
{
e.printStackTrace();
}
| Constructor Summary | |
|---|---|
BSDClient(java.net.InetAddress address,
int port)
Create a Client for sending a BSD message with an address and a port |
|
BSDClient(java.lang.String addressAndPort)
Create a Client for sending a BSD message with a String Address:port |
|
BSDClient(java.lang.String address,
int port)
Create a Client for sending a BSD message with an address and a port |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
void |
sendMessage(BSDMessage message)
send a message to the server specified in the constructor |
void |
sendMessage(java.lang.String message)
send a message to the server specified in the constructor |
void |
sendMessageFromFile(java.lang.String fromFile)
Send several message in a file The file MUST contain one message by line |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BSDClient(java.net.InetAddress address,
int port)
address - Addess of the BSD server. The address should be of InetAddress type.port - Port of the BSD Server
Example of use : BSDClient client = new BSDClient(InetAddress.getByName("127.0.0.1"),515 ) ;
public BSDClient(java.lang.String address,
int port)
throws java.net.UnknownHostException
address - Addess of the BSD server. The address should be of String type.port - Port of the BSD Server
Example of use : BSDClient client = new BSDClient( "127.0.0.1" ,515 ) ;
java.net.UnknownHostException
public BSDClient(java.lang.String addressAndPort)
throws java.net.UnknownHostException
addressAndPort - Addess and the port of the BSD server. java.net.UnknownHostException| Method Detail |
|---|
public void sendMessage(BSDMessage message)
throws java.io.IOException
message - a BSDMessage created previously
java.io.IOException
public void sendMessage(java.lang.String message)
throws java.io.IOException
message - a string BSDMessage created previously. java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
public void sendMessageFromFile(java.lang.String fromFile)
throws java.io.IOException
fromFile -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||