|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OtpTransportFactory
Factory class used to create client- and server-side transport instances. One
static instance of class implementing this interface is created when program
loaded. Default implementation used is OtpSocketTransportFactory
.
JInterface user can specify custom transport factory implementing this
interface in the following ways:
System.getProperty("sun.java.command")
, user can define static
class OtpErlangSystemTuner internal to the main class, providing at
least one static method with the name getOtpTransportFactory, with no
parameters, returning object of class implementing
OtpTransportFactory, for example:
public class MyMainClass { public static class OtpErlangSystemTuner { ... public static OtpTransportFactory getOtpTransportFactory() { return new MyTransportFactory(); } } public static class MyTransportFactory implements OtpTransportFactory { ... } public static void main(String[] args) { ... } }
package com.my.company; public static class MyTransportFactory implements OtpTransportFactory { ... }In such case program may be run with -DOtpTransportFactory=com.my.company.MyTransportFactory, or other way of setting system property before execution of static initializers may be used.
Method Summary | |
---|---|
OtpServerTransport |
createServerTransport(int port)
Create instance of OtpServerTransport |
OtpTransport |
createTransport(java.net.InetAddress addr,
int port)
Create instance of OtpTransport |
OtpTransport |
createTransport(java.lang.String addr,
int port)
Create instance of OtpTransport |
Method Detail |
---|
OtpTransport createTransport(java.lang.String addr, int port) throws java.io.IOException
OtpTransport
addr
- host name or IP address stringport
- port number
java.io.IOException
OtpTransport createTransport(java.net.InetAddress addr, int port) throws java.io.IOException
OtpTransport
addr
- peer addressport
- port number
java.io.IOException
OtpServerTransport createServerTransport(int port) throws java.io.IOException
OtpServerTransport
port
- port number to listen on
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |