public final class NetServerManager extends Object
NetServerChannels
.
Channels are added to this collection using the createChannel
method, and they are removed from the collection using the
release
method of the channel.
There exists only one NetServerManager
, which can be obtain using the
getNetServerManager
method.
Constructor and Description |
---|
NetServerManager(Object owner,
Object options)
Constructs a new
NetServerManager instance. |
Modifier and Type | Method and Description |
---|---|
NetServerChannel |
createChannel(String name,
URI netserURI,
URI layoutURI,
boolean encryptAll,
boolean autoLogin)
Creates a
NetServerChannel indexed by name . |
NetServerClient |
createClient(String channelName,
String description,
DesktopTask task)
Creates a NetServer client bound to specified desktop task.
|
NetServerChannel |
getChannel(String channelName)
Returns the
NetServerChannel indexed by the given name. |
Collection<NetServerChannel> |
getChannels()
Returns an unmodifiable collection with all
NetServerChannel . |
boolean |
isTracing()
Returns
true if tracing inbound and outbound messages. |
void |
release()
Closes this
NetServerManager , relinquishing any underlying
resources. |
void |
setTracing(boolean tracing)
Enables or disables tracing of inbound and outbound messages.
|
public NetServerManager(Object owner, Object options) throws Exception
NetServerManager
instance.owner
- the owner of this NetServerManager.options
- the options of this NetServerManager.NullPointerException
- if an argument is null
.IllegalArgumentException
- if an argument is invalid.Exception
- if another error occurs.public boolean isTracing()
true
if tracing inbound and outbound messages.true
if tracing inbound and outbound messages.public void setTracing(boolean tracing)
tracing
- if true
messages will be traced.public Collection<NetServerChannel> getChannels()
NetServerChannel
.NetServerChannel
.IllegalStateException
- if this NetServerManager is closed.public NetServerChannel getChannel(String channelName)
NetServerChannel
indexed by the given name. Returns
null
if the channel is not defined.channelName
- the name of the NetServerChannel
.null
if the channel is not defined.NullPointerException
- if channelName
is null
.IllegalStateException
- if this NetServerManager is closed.public NetServerClient createClient(String channelName, String description, DesktopTask task)
channelName
- the name of the NetServer channel.description
- the description of the NetServer client.task
- a desktop task instance (can be null).NullPointerException
- if an argument is null
.IllegalArgumentException
- if channel does not exist.IllegalStateException
- if this NetServerManager is closed.public NetServerChannel createChannel(String name, URI netserURI, URI layoutURI, boolean encryptAll, boolean autoLogin) throws Exception
NetServerChannel
indexed by name
. There can be
one one NetServerChannel
with a given name, so if a channel is
already defined with the specified name
, the existing channel is
returned instead of creating a new one.
netserURI
specifies the direct or indirect address of OBCOM
NetServer. The protocol (scheme) of netserURI
can be either
"net
" for classic connections, or "nets
" for SSL/TLS
connections. If netserURI
does not specify a protocol, it is
interpreted as the relative address of a servlet that comunicates with
OBCOM NetServer. In this case, netserURI
is converted to
an absolute address using the desktop secure codebase. Examples of valid
netserURI:
net://www.obcom.cl:10104 nets://0.0.0.0:10114 netservlet
layoutURI
specifies the address used to download layouts. If
layoutURI
is relative, it is converted to an absolute address
using the desktop secure codebase. layoutURI
must contain at
least one occurrence of the special placeholder character "*". Before
each download, all occurrences of this placeholder are replaced with the
name of the requiered Layout
. Examples
of valid layoutURI:
layouts/*.jsp http://www.obcom.cl/desktopfx/layouts/*.aspx
name
- the name of the NetServerChannel
.netserURI
- the server URI of the NetServerChannel
.layoutURI
- the layout URI of the NetServerChannel
.encryptAll
- if true
all messages are sent encrypted.autoLogin
- if true
login is performed after connecting.NetServerChannel
indexed by name
.NullPointerException
- if an argument is null
.IllegalArgumentException
- if an argument is invalid.Exception
- if another error occurs.public void release()
NetServerManager
, relinquishing any underlying
resources. No other method of this NetServerManager
can be used
after this method has been issued. Calling this method more than once is
allowed but has no effect after the first invocation.Copyright © OBCOM INGENIERIA S.A. (Chile). All Rights Reserved.