@NotThreadSafe
public class StreamedMessagesPortClient
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_ATTRIBUTE
Client attribute.
|
static String |
DONE_ELEMENT
Done element name.
|
static String |
EXCEPTION_ATTRIBUTE
Exception attribute name.
|
static String |
FAILED_ELEMENT
Failed element name.
|
static String |
FLUSH_ATTRIBUTE
Flush attribute name.
|
static String |
FLUSH_ELEMENT
Flush element name.
|
static String |
ID_ATTRIBUTE
ID attribute.
|
static String |
LOGIN_ELEMENT
Login element name.
|
static String |
MESSAGES_ELEMENT
Messages element name.
|
static String |
PASSWORD_ATTRIBUTE
Password attribute.
|
static String |
REF_ATTRIBUTE
REF attribute.
|
static String |
USER_ATTRIBUTE
User attribute.
|
| Constructor and Description |
|---|
StreamedMessagesPortClient(String client)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(Serializable message)
Adds a message.
|
void |
close()
Closes the connection.
|
void |
flush()
Flushes pending entries.
|
boolean |
isOpen()
Asks if this is open.
|
void |
login(LoginInfo loginInfo)
Logs in.
|
void |
login(Optional<String> user,
Optional<char[]> password)
Logs in.
|
void |
open(String addressString,
Optional<SecurityContext> securityContext)
Opens a connection to the XML Port.
|
void |
sendMessages(boolean flush)
Sends messages.
|
boolean |
setUp(Optional<KeyedGroups> configProperties,
Optional<KeyedValues> moduleProperties)
Sets up this.
|
void |
tearDown()
Tears down what has been set up.
|
public static final String CLIENT_ATTRIBUTE
public static final String DONE_ELEMENT
public static final String EXCEPTION_ATTRIBUTE
public static final String FAILED_ELEMENT
public static final String FLUSH_ATTRIBUTE
public static final String FLUSH_ELEMENT
public static final String ID_ATTRIBUTE
public static final String LOGIN_ELEMENT
public static final String MESSAGES_ELEMENT
public static final String PASSWORD_ATTRIBUTE
public static final String REF_ATTRIBUTE
public static final String USER_ATTRIBUTE
public StreamedMessagesPortClient(@Nonnull
String client)
client - The client identification.public void addMessage(@Nonnull
Serializable message)
message - The message.public void close()
public void flush()
throws ServiceNotAvailableException
ServiceNotAvailableException - When the service is not available.@CheckReturnValue public boolean isOpen()
public void login(@Nonnull
LoginInfo loginInfo)
throws ServiceNotAvailableException
loginInfo - The login info.ServiceNotAvailableException - When the service is not available.public void login(@Nonnull
Optional<String> user,
@Nonnull
Optional<char[]> password)
throws ServiceNotAvailableException
user - The optional user.password - The optional password.ServiceNotAvailableException - When the service is not available.public void open(@Nonnull
String addressString,
@Nonnull
Optional<SecurityContext> securityContext)
throws ServiceNotAvailableException
addressString - The address for the port (host:port).securityContext - An optional security context.ServiceNotAvailableException - When the service is not available.public void sendMessages(boolean flush)
throws ServiceNotAvailableException
flush - True asks for a flush.ServiceNotAvailableException - When the service is not available.@CheckReturnValue
public boolean setUp(@Nonnull
Optional<KeyedGroups> configProperties,
@Nonnull
Optional<KeyedValues> moduleProperties)
configProperties - The optional configuration properties.moduleProperties - The optional module properties.public void tearDown()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.