asia.redact.bracket.properties.mgmt
Class HostnameServerLocaleBuilder

java.lang.Object
  extended by asia.redact.bracket.properties.mgmt.ServerLocaleBuilder
      extended by asia.redact.bracket.properties.mgmt.HostnameServerLocaleBuilder

public class HostnameServerLocaleBuilder
extends ServerLocaleBuilder

 
 Builder to generate a ServerLocale.
 
 This implementation uses the local host name to try to generate a
 ServerLocale. For this to work, the host names of the servers involved
 must obey a regular pattern that contains the environment, cluster, and
 instance. A regular expression is submitted which sniffs for this pattern.
 I think most admins name their servers with some kind of pattern, but it
 may be nothing which is amenable to this code.
 
 This class is very specific to servers I work with - your best bet
 is to extend ServerLocaleBuilder to get your server name your way
 
 

Author:
Dave

Field Summary
(package private)  String pattern
           
 
Constructor Summary
HostnameServerLocaleBuilder()
           
HostnameServerLocaleBuilder(String pattern)
           
 
Method Summary
 ServerLocale findServerLocale()
           
 String getPattern()
           
 void setPattern(String pattern)
           
 
Methods inherited from class asia.redact.bracket.properties.mgmt.ServerLocaleBuilder
fromInet, fromSystemProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

String pattern
Constructor Detail

HostnameServerLocaleBuilder

public HostnameServerLocaleBuilder()

HostnameServerLocaleBuilder

public HostnameServerLocaleBuilder(String pattern)
Method Detail

findServerLocale

public ServerLocale findServerLocale()
Specified by:
findServerLocale in class ServerLocaleBuilder

getPattern

public String getPattern()

setPattern

public void setPattern(String pattern)


Copyright © 2011-2013 David R. Smith. All Rights Reserved.