public SocketListeningConnector() { super(new SocketTransportService()); addIntegerArgument( ARG_PORT, getString("socket_listening.port.label"), getString("socket_listening.port"), "", false, 0, Integer.MAX_VALUE); addStringArgument( ARG_LOCALADDR, getString("socket_listening.localaddr.label"), getString("socket_listening.localaddr"), "", // default is wildcard false); transport = new Transport() { public String name() { return "dt_socket"; // for compatibility reasons } }; }
public SocketAttachingConnector() { super(new SocketTransportService()); String defaultHostName = "localhost"; addStringArgument( ARG_HOST, getString("socket_attaching.host.label"), getString("socket_attaching.host"), defaultHostName, false); addIntegerArgument( ARG_PORT, getString("socket_attaching.port.label"), getString("socket_attaching.port"), "", true, 0, Integer.MAX_VALUE); transport = new Transport() { public String name() { return "dt_socket"; // for compatibility reasons } }; }
public ProcessAttachingConnector() { addStringArgument( ARG_PID, getString("process_attaching.pid.label"), getString("process_attaching.pid"), "", true); addIntegerArgument( ARG_TIMEOUT, getString("generic_attaching.timeout.label"), // use generic keys to keep getString("generic_attaching.timeout"), // resource bundle small "", false, 0, Integer.MAX_VALUE); transport = new Transport() { public String name() { return "local"; } }; }
public Transport transport() { return new Transport() { public String name() { return ts.name(); } }; }
/** * Initialize a new instance of this connector. The connector * encapsulates a transport service, has a "timeout" connector argument, * and optionally an "address" connector argument. */ private GenericListeningConnector(TransportService ts, boolean addAddressArgument) { transportService = ts; transport = new Transport() { public String name() { return transportService.name(); } }; if (addAddressArgument) { addStringArgument( ARG_ADDRESS, getString("generic_listening.address.label"), getString("generic_listening.address"), "", false); } addIntegerArgument( ARG_TIMEOUT, getString("generic_listening.timeout.label"), getString("generic_listening.timeout"), "", false, 0, Integer.MAX_VALUE); listenMap = new HashMap<Map<String, ? extends Connector.Argument>, TransportService.ListenKey>(10); }
public Transport transport() { if (transport == null) { return new Transport() { public String name() { return "local"; } }; } return transport; }
private GenericAttachingConnector(TransportService ts, boolean addAddressArgument) { transportService = ts; transport = new Transport() { public String name() { // delegate name to the transport service return transportService.name(); } }; if (addAddressArgument) { addStringArgument( ARG_ADDRESS, getString("generic_attaching.address.label"), getString("generic_attaching.address"), "", true); } addIntegerArgument( ARG_TIMEOUT, getString("generic_attaching.timeout.label"), getString("generic_attaching.timeout"), "", false, 0, Integer.MAX_VALUE); }
private void internalSetTransport(Transport transport) { try { Method setter = ConnectorImpl.class.getDeclaredMethod("setTransport", Transport.class); setter.setAccessible(true); setter.invoke(this, transport); } catch (Exception ex) { // probably should log this ex.printStackTrace(); } }
public Transport transport() { return transport; }
public F3Transport(Transport underlying) { this.underlying = underlying; }
protected Transport underlying() { return underlying; }
public Transport transport() { return new F3Transport(underlying().transport()); }
/** * Applicable if IDEA is run on JDK 1.4.2.x only! * @param transportObj */ private TransportServiceWrapper(Transport transportObj) { myDelegateClass = transportObj.getClass(); myDelegateObject = transportObj; }
/** * Applicable if IDEA is run on JDK 1.4.2.x only! * @param transportObject * @return transport service wrapper */ public static TransportServiceWrapper getTransportService(Transport transportObject){ return new TransportServiceWrapper(transportObject); }