Package org.apache.etch.util

Examples of org.apache.etch.util.URL


    { CommandParser.class, Option.class, String.class, URL.class };

  @Override
  protected Object convertValue( String value )
  {
    return new URL( value );
  }
View Full Code Here


 
  private final Field field;

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

   * @throws Exception
   */
  static public TransportMessage 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 ) throws Exception
  {
    URL u = new URL( uri );
    TransportFactory f = getTransportFactory( u.getScheme() );
    return f.newListener( 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

TOP

Related Classes of org.apache.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.