[jboss-cvs] JBossAS SVN: r107140 - projects/cluster/ha-server-core/trunk/src/main/java/org/jboss/ha/core/channelfactory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 27 22:56:54 EDT 2010
Author: pferraro
Date: 2010-07-27 22:56:54 -0400 (Tue, 27 Jul 2010)
New Revision: 107140
Modified:
projects/cluster/ha-server-core/trunk/src/main/java/org/jboss/ha/core/channelfactory/JChannelFactory.java
Log:
Fix compiler warnings.
Modified: projects/cluster/ha-server-core/trunk/src/main/java/org/jboss/ha/core/channelfactory/JChannelFactory.java
===================================================================
--- projects/cluster/ha-server-core/trunk/src/main/java/org/jboss/ha/core/channelfactory/JChannelFactory.java 2010-07-28 02:56:40 UTC (rev 107139)
+++ projects/cluster/ha-server-core/trunk/src/main/java/org/jboss/ha/core/channelfactory/JChannelFactory.java 2010-07-28 02:56:54 UTC (rev 107140)
@@ -91,6 +91,7 @@
*
* @version $Revision$
*/
+ at SuppressWarnings("deprecation")
public class JChannelFactory
implements org.jgroups.ChannelFactory, JChannelFactoryMBean, MBeanRegistration
{
@@ -189,6 +190,7 @@
/**
* Always throws <code>ChannelException</code>; this method is not supported.
*/
+ @Override
public Channel createChannel() throws ChannelException
{
throw new ChannelException("No-arg createChannel() is not supported");
@@ -203,6 +205,7 @@
*
* @return the channel
*/
+ @Override
public Channel createChannel(Object properties) throws ChannelException
{
checkStarted();
@@ -214,7 +217,6 @@
try
{
- @SuppressWarnings("deprecation")
ProtocolStackConfigurator c = ConfiguratorFactory.getStackConfigurator(properties);
config = c;
}
@@ -260,6 +262,7 @@
*
* @throws Exception
*/
+ @Override
public Channel createChannel(String stack_name) throws Exception
{
return createChannelFromRegisteredStack(stack_name, null, false);
@@ -305,6 +308,7 @@
* <code>false</code>.
* @throws ChannelException
*/
+ @Override
public Channel createMultiplexerChannel(String stack_name, String id) throws Exception
{
return createChannelFromRegisteredStack(stack_name, id, true);
@@ -330,6 +334,7 @@
* <code>false</code>.
* @throws ChannelException
*/
+ @Override
public Channel createMultiplexerChannel(String stack_name, String id, boolean register_for_state_transfer, String substate_id) throws Exception
{
return createMultiplexerChannel(stack_name, id);
@@ -344,6 +349,7 @@
* @param properties document root node for XML content in the JGroups
* <code>stacks.xml</code> format
*/
+ @Override
public void setMultiplexerConfig(Element properties) throws Exception
{
setMultiplexerConfig(properties, true);
@@ -358,6 +364,7 @@
* @param properties file which must contain XML content in the JGroups
* <code>stacks.xml</code> format
*/
+ @Override
public void setMultiplexerConfig(File properties) throws Exception
{
setMultiplexerConfig(properties, true);
@@ -373,6 +380,7 @@
* which must contain XML content in the JGroups
* <code>stacks.xml</code> format
*/
+ @Override
public void setMultiplexerConfig(Object properties) throws Exception
{
setMultiplexerConfig(properties, true);
@@ -388,6 +396,7 @@
* which must contain XML content in the JGroups
* <code>stacks.xml</code> format
*/
+ @Override
public void setMultiplexerConfig(String properties) throws Exception
{
setMultiplexerConfig(properties, true);
@@ -402,6 +411,7 @@
* @param properties URL which must contain XML content in the JGroups
* <code>stacks.xml</code> format
*/
+ @Override
public void setMultiplexerConfig(URL properties) throws Exception
{
setMultiplexerConfig(properties, true);
@@ -437,32 +447,38 @@
* @return the domain. Will not return <code>null</code> after {@link #create()}
* has been invoked.
*/
+ @Override
public String getDomain()
{
return domain == null ? "jgroups" : domain;
}
+ @Override
public void setDomain(String domain)
{
this.domain = domain;
this.domainSet = true;
}
+ @Override
public boolean isExposeChannels()
{
return expose_channels;
}
+ @Override
public void setExposeChannels(boolean expose_channels)
{
this.expose_channels=expose_channels;
}
+ @Override
public boolean isExposeProtocols()
{
return expose_protocols;
}
+ @Override
public void setExposeProtocols(boolean expose_protocols)
{
this.expose_protocols=expose_protocols;
@@ -743,6 +759,7 @@
* replace that configuration; <code>false</code> if it
* should be discarded.
*/
+ @Override
public void setMultiplexerConfig(String properties, boolean replace) throws Exception
{
InputStream input=ConfiguratorFactory.getConfigStream(properties);
@@ -801,6 +818,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void clearConfigurations()
{
this.stacks.clear();
@@ -809,6 +827,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String dumpChannels()
{
return "";
@@ -817,6 +836,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String dumpConfiguration()
{
return stacks.keySet().toString();
@@ -825,6 +845,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String getConfig(String stack_name) throws Exception
{
ProtocolStackConfigInfo cfg = stacks.get(stack_name);
@@ -836,6 +857,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public String getMultiplexerConfig()
{
StringBuilder sb = new StringBuilder();
@@ -849,6 +871,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean removeConfig(String stack_name)
{
return stack_name != null && this.stacks.remove(stack_name) != null;
@@ -863,6 +886,7 @@
* field, delegating the real work to {@link #createService()}.
* </p>
*/
+ @Override
public void create() throws Exception
{
@@ -896,6 +920,7 @@
* field, delegating the real work to {@link #startService()}.
* </p>
*/
+ @Override
public void start() throws Exception
{
if (state == STARTING || state == STARTED || state == STOPPING)
@@ -936,6 +961,7 @@
* field, delegating the real work to {@link #stopService()}.
* </p>
*/
+ @Override
public void stop()
{
if (state != STARTED)
@@ -969,6 +995,7 @@
* field, delegating the real work to {@link #destroyService()}.
* </p>
*/
+ @Override
public void destroy()
{
if (state == DESTROYED)
@@ -999,6 +1026,7 @@
// ------------------------------------------------------- MBeanRegistration
+ @Override
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
{
setServer(server);
@@ -1009,6 +1037,7 @@
return name;
}
+ @Override
public void postRegister(Boolean registrationDone)
{
if (registrationDone != null && registrationDone.booleanValue()
@@ -1018,10 +1047,12 @@
}
}
+ @Override
public void preDeregister() throws Exception
{
}
+ @Override
public void postDeregister()
{
setServer(null);
@@ -1288,7 +1319,6 @@
// But use the specified node address for multi-homing
- String hostIP = null;
InetAddress address = fixRemoteAddress(nodeAddress);
if (address == null)
{
@@ -1296,10 +1326,8 @@
log.debug ("using a full GUID strategy");
return new VMID().toString();
}
- else
- {
- hostIP = getFastHostName(address);
- }
+
+ String hostIP = getFastHostName(address);
// 1st: is JNDI up and running?
//
@@ -1308,14 +1336,12 @@
// we can proceed with the JNDI trick!
return hostIP + ":" + namingServicePort;
}
- else
- {
- log.warn("JNDI has been found but the service wasn't started. Most likely, " +
- "HAPartition bean is missing dependency on JBoss Naming. " +
- "Instead using host based UID strategy for defining a node " +
- "GUID for the cluster.");
- }
+ log.warn("JNDI has been found but the service wasn't started. Most likely, " +
+ "HAPartition bean is missing dependency on JBoss Naming. " +
+ "Instead using host based UID strategy for defining a node " +
+ "GUID for the cluster.");
+
// 2nd: host-GUID strategy
//
String uid = new UID().toString();
@@ -1417,7 +1443,7 @@
return result;
}
- private void fixChannelThreadManagement(Channel channel) throws ChannelException
+ private void fixChannelThreadManagement(Channel channel)
{
if (!(channel instanceof JChannel))
{
@@ -1573,7 +1599,7 @@
*
* @param thread the thread to set
*/
- private void setDefaultThreadContextClassLoader(Thread thread, ClassLoader classLoader)
+ void setDefaultThreadContextClassLoader(Thread thread, ClassLoader classLoader)
{
classLoaderSwitcher.setContextClassLoader(thread, classLoader);
}
@@ -1682,11 +1708,12 @@
private final ClassLoader classloader;
private ThreadDecorator parent;
- private ThreadDecoratorImpl(ClassLoader classloader)
+ ThreadDecoratorImpl(ClassLoader classloader)
{
this.classloader = classloader;
}
+ @Override
public void threadCreated(Thread thread)
{
if (parent != null)
@@ -1694,6 +1721,7 @@
setDefaultThreadContextClassLoader(thread, classloader);
}
+ @Override
public void threadReleased(Thread thread)
{
if (parent != null)
@@ -1701,6 +1729,7 @@
setDefaultThreadContextClassLoader(thread, classloader);
}
+ @SuppressWarnings("unused")
public ThreadDecorator getParent()
{
return parent;
@@ -1710,15 +1739,15 @@
{
this.parent = parent;
}
-
}
- private class ChannelCloseListener extends ChannelListenerAdapter
+ class ChannelCloseListener extends ChannelListenerAdapter
{
+ @SuppressWarnings("synthetic-access")
+ @Override
public void channelClosed(Channel channel)
{
unregisterChannel(channel);
}
}
-
}
More information about the jboss-cvs-commits
mailing list