Package etch.util

Examples of etch.util.URL


   * @param uri
   * @param resources
   */
  public TcpConnection( Socket socket, String uri, Resources resources )
  {
    this( socket, new URL( uri ), resources );
  }
View Full Code Here


   * @param uri
   * @param resources
   */
  public Packetizer( TransportData transport, String uri, Resources resources )
  {
    this( transport, new URL( uri ), resources );
  }
View Full Code Here

   * @throws Exception
   */
  public UdpConnection( String uri, Resources resources )
    throws Exception
  {
    URL u = new URL( uri );
   
    listen = u.getBooleanTerm( "listen", false );
   
    host = translateHost( u.getHost() );
    if (!listen && host == null)
      throw new IllegalArgumentException( "host == null" );
   
    port = u.getPort();
    if (port == null)
      throw new IllegalArgumentException( "port == null" );
   
    if (port <= 0 || port > 65535)
      throw new IllegalArgumentException( "port <= 0 || port > 65535" );
   
    setDefaultTrafficClass( u.getIntegerTerm( TRAFFIC_CLASS, 0 ) );
   
    // there are three ways to do this:
    // 1. bound socket, unconnected (listening to anyone on well-known host/port
    // 2. bound socket, connected (listening to someone on well-known host/port)
    // 3. unbound socket, connected (listening to someone on assigned host/port)
View Full Code Here

   * @param uri
   * @param resources
   */
  public Tcp2Listener( String uri, Resources resources )
  {
    this( new URL( uri ), resources );
  }
View Full Code Here

 
  private final Field field;

  public Object importValue( StructValue struct )
  {
    return new URL( (String) struct.get( field ) );
  }
View Full Code Here

   * @param resources
   */
  public PlainMailboxManager( TransportMessage transport, String uri,
    Resources resources )
  {
    this( transport, new URL( uri ), resources );
  }
View Full Code Here

   * @throws Exception
   */
  static public DeliveryService getTransport( String uri,
    Resources resources ) throws Exception
  {
    URL u = new URL( uri );
    TransportFactory f = getTransportFactory( u.getScheme() );
    return f.newTransport( uri, resources );
  }
View Full Code Here

   * @throws Exception
   */
  static public Transport<ServerFactory> getListener( String uri,
    Resources resources, ServerFactory factory ) throws Exception
  {
    URL u = new URL( uri );
    TransportFactory f = getTransportFactory( u.getScheme() );
    return f.newListener( uri, resources, factory );
  }
View Full Code Here

   * @param resources
   */
  public DefaultDeliveryService( MailboxManager transport, String uri,
    Resources resources )
  {
    this( transport, new URL( uri ), resources );
  }
View Full Code Here

 
  @Override
  public DeliveryService newTransport( String uri,
    Resources resources ) throws Exception
  {
    URL u = new URL( uri );
   
    Object socket = resources.get( SOCKET );
   
    TransportData c = null;
   
View Full Code Here

TOP

Related Classes of etch.util.URL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.