public class StreamFactory
extends java.lang.Object
Property Keyword | Datatype | Default | Description |
---|---|---|---|
CORBAFileServer.NameServiceName | String | NameService | The name of the requested CORBA Name Service. This value has more priority than NameServiceName, but is ignored if ORBInitRef is set. This value is an application property. |
NameServiceName | String | NameService | The name of the requested CORBA Name Service. This value has less priority than CORBAFileServer.NameServiceName, both are ignored if ORBInitRef is set. This value is an application property. |
CORBAFileServer.NameServicePort | String | 2809 | The port number of the requested CORBA Name Service. This value has more priority than NameServicePort, but is ignored if ORBInitRef is set. This value is an application property. |
NameServicePort | String | 2809 | The port number of the requested CORBA Name Service. This value has less priority than CORBAFileServer.NameServicePort, both are ignored if ORBInitRef is set. This value is an application property. |
CORBAFileServer.NameServiceHost | String | localhost | The host name of the requested CORBA Name Service. This value has more priority than NameServiceHost, but is ignored if ORBInitRef is set. This value is an application property. |
NameServiceHost | String | localhost | The host name of the requested CORBA Name Service. This value has less priority than CORBAFileServer.NameServiceHost, both are ignored if ORBInitRef is set. This value is an application property. |
CORBAProtocol | String | "" | The CORBA protocol in the corbaloc (CORBA locator) to find the name
service. The default of CORBA is iiop, which is identical with an empty string "". For IIOP over SSL the protocol must be ssliop. This value is an application property. |
ORBInitRef | String | none | The full CORBA locator. If this value is set, the values of (CORBAFileServer.)NameServiceName, NameServicePort, NameServiceHost and CORBAProtocol are ignored. This value is an application property. Example: corbaloc::1.2@MyServiceHost:MyServicePort/NameService |
CORBAFileServer.PrintNameServiceIOR | boolean | false | If true the IOR of the service will be printed at startup time. |
CORBAFileServer.RegistrationFormat | String | {0} | The registration format of the server. For more information see the description of the CORBAFileServer. |
CORBAFileServer.BufferSize | int | 100000 | The total number of bytes of the buffer used to transfer the data. |
CORBAFileServer.DebugLevel | int | 0 | The debug level. For more information see the description of the CORBAFileServer. |
CORBAFileServer.ServiceName | String | none | The name of the service registered at the Name Service. |
Type | Property and Description |
---|---|
java.lang.String[] |
list
List all property.
|
Modifier and Type | Field and Description |
---|---|
protected static java.util.HashMap |
CORBA_LOCATOR_MAP |
static java.lang.String |
DEFAULT_BUFFER_SIZE |
static java.lang.String |
DEFAULT_CORBA_IMPLEMENTATION |
static java.lang.String |
DEFAULT_DEBUG_LEVEL |
static java.lang.String |
DEFAULT_NAME_SERVICE_NAME |
static java.lang.String |
DEFAULT_NAME_SERVICE_PORT |
static java.lang.String |
DEFAULT_REGISTRATION_FORMAT |
static java.lang.String |
DEFAULT_USESSL |
static java.lang.String |
FILESERVER_KIND |
protected static StreamFactory |
instance |
static int |
MAX_SERVER |
protected java.util.Properties |
properties |
static java.lang.String |
ROOT_POA_NAME |
protected org.omg.PortableServer.POA |
rootpoa |
protected static boolean |
securityEvaluated |
protected boolean |
securityLevel |
Modifier | Constructor and Description |
---|---|
protected |
StreamFactory() |
Modifier and Type | Method and Description |
---|---|
org.omg.CORBA.ORB |
createORB(java.util.logging.Logger logger)
Creates a new ORB for Corba clients, servers and the name server.
|
org.omg.CORBA.ORB |
createORB(java.lang.String[] args,
java.util.logging.Logger logger)
Creates a new ORB for Corba clients, servers and the name server.
|
void |
destroy()
Destroy the factory.
|
protected void |
finalize() |
int |
getBufferSize()
Get the buffer size.
|
java.lang.String |
getCORBAProtocol()
Get the relevant CORBA protocol.
|
int |
getDebugLevel()
Get the debugLevel.
|
static StreamFactory |
getInstance()
The factory instance.
|
org.omg.CosNaming.NamingContextExt |
getNameService(org.omg.CORBA.ORB orb)
Get the name service context.
|
java.lang.String |
getNameServiceHost()
Get the relevant name service host.
|
java.lang.String |
getNameServiceName()
Get the NameService name.
|
java.lang.String |
getNameServicePort()
Get the relevant name service port.
|
protected org.omg.CORBA.ORB |
getORB(java.util.logging.Logger logger)
Get the orb of the factory.
|
java.lang.String[] |
getOrbArguments() |
java.lang.String |
getORBInitRef()
Get the relevant orbinitref (corba locator).
|
protected org.omg.PortableServer.POA |
getPOA(java.util.logging.Logger logger)
Get the poa of the factory.
|
java.lang.String |
getProperty(java.lang.String key)
Get a property.
|
boolean |
getProperty(java.lang.String key,
boolean def)
Get a property.
|
int |
getProperty(java.lang.String key,
int def)
Get a property.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
Get a property.
|
java.net.ServerSocket |
getServerSocket(int port) |
CORBAFileServerIF |
getService(java.util.logging.Logger logger)
Get the service.
|
CORBAFileServerIF |
getService(java.lang.String name,
java.util.logging.Logger logger)
Get the service.
|
java.lang.String |
getServiceName()
Get the service name on configured host.
|
java.lang.String |
getServiceName(java.lang.String hostname)
Get the service name for a specific host.
|
java.net.Socket |
getSocket(java.lang.String host,
int port)
Creates and returns a new Socket.
|
boolean |
getUseSSL() |
static boolean |
isSecurityActive()
Get the security active flag.
|
java.lang.String[] |
listProperty()
List all property.
|
java.lang.String[] |
listServices(java.util.logging.Logger logger)
Returns a list all services that seems to belong to the CORBAFileServer
group.
|
java.lang.String[] |
listServices(java.lang.String pattern,
java.util.logging.Logger logger)
Returns a list of available services.
|
org.omg.PortableServer.Servant |
referenceToServant(org.omg.CORBA.Object reference) |
void |
removeProperty(java.lang.String key)
Remove a property.
|
protected boolean |
securityLevel() |
org.omg.CORBA.Object |
servantToReference(org.omg.PortableServer.Servant servant) |
void |
setORB(org.omg.CORBA.ORB orb)
Set the ORB instance.
|
void |
setProperties(java.util.Properties properties)
Set the properties of the factory.
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Get a property.
|
public static final int MAX_SERVER
public static final java.lang.String DEFAULT_NAME_SERVICE_NAME
public static final java.lang.String DEFAULT_NAME_SERVICE_PORT
public static final java.lang.String DEFAULT_CORBA_IMPLEMENTATION
public static final java.lang.String ROOT_POA_NAME
public static final java.lang.String FILESERVER_KIND
public static final java.lang.String DEFAULT_REGISTRATION_FORMAT
public static final java.lang.String DEFAULT_BUFFER_SIZE
public static final java.lang.String DEFAULT_DEBUG_LEVEL
public static final java.lang.String DEFAULT_USESSL
protected static java.util.HashMap CORBA_LOCATOR_MAP
protected static StreamFactory instance
protected static boolean securityEvaluated
protected org.omg.PortableServer.POA rootpoa
protected java.util.Properties properties
protected boolean securityLevel
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static StreamFactory getInstance()
public java.lang.String getCORBAProtocol()
public java.lang.String getNameServiceHost()
public java.lang.String getNameServicePort()
public java.lang.String getORBInitRef()
public void setProperties(java.util.Properties properties)
protected org.omg.PortableServer.POA getPOA(java.util.logging.Logger logger)
protected org.omg.CORBA.ORB getORB(java.util.logging.Logger logger)
public void destroy()
public void setORB(org.omg.CORBA.ORB orb)
orb
- the instance of the orb.public org.omg.PortableServer.Servant referenceToServant(org.omg.CORBA.Object reference)
public org.omg.CORBA.Object servantToReference(org.omg.PortableServer.Servant servant)
public java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key, java.lang.String def)
public int getProperty(java.lang.String key, int def)
public boolean getProperty(java.lang.String key, boolean def)
public java.lang.String[] listProperty()
public void removeProperty(java.lang.String key)
public void setProperty(java.lang.String key, java.lang.String value)
public org.omg.CORBA.ORB createORB(java.util.logging.Logger logger)
public org.omg.CORBA.ORB createORB(java.lang.String[] args, java.util.logging.Logger logger)
args
- Command-line arguments for the application's main method. May be
null.public java.lang.String[] getOrbArguments()
public java.lang.String getNameServiceName()
public org.omg.CosNaming.NamingContextExt getNameService(org.omg.CORBA.ORB orb)
public CORBAFileServerIF getService(java.util.logging.Logger logger)
public CORBAFileServerIF getService(java.lang.String name, java.util.logging.Logger logger)
public java.lang.String getServiceName()
public java.lang.String getServiceName(java.lang.String hostname)
public java.lang.String[] listServices(java.lang.String pattern, java.util.logging.Logger logger) throws CORBAFileServerException
pattern
- The name or the search pattern of the requested service. The
pattern "*" is equivalent to NULL.AoException
- with the following possible error codes: AO_BAD_PARAMETER
AO_IMPLEMENTATION_PROBLEM AO_NOT_IMPLEMENTED AO_NO_MEMORYCORBAFileServerException
public java.lang.String[] listServices(java.util.logging.Logger logger) throws CORBAFileServerException
AoException
- with the following possible error codes: AO_BAD_PARAMETER
AO_IMPLEMENTATION_PROBLEM AO_NOT_IMPLEMENTED AO_NO_MEMORYCORBAFileServerException
public int getBufferSize()
public int getDebugLevel()
public static boolean isSecurityActive()
protected boolean securityLevel()
public boolean getUseSSL()
public java.net.Socket getSocket(java.lang.String host, int port) throws java.net.UnknownHostException, java.io.IOException
host
- the host to open the socket onport
- the port to open the socket onjava.net.UnknownHostException
java.io.IOException
public java.net.ServerSocket getServerSocket(int port) throws java.io.IOException
java.io.IOException